[php-src] PR #20079: Mask USR1/HUP while waiting for preloading

From: Date: Mon, 06 Oct 2025 16:06:34 +0000
Subject: [php-src] PR #20079: Mask USR1/HUP while waiting for preloading
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-33505@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/20079 Author: arnaud-lb Possible alternative fix for GH-20051 (https://github.com/php/php-src/pull/20051#discussion_r2405170821) Preloading may fork a process and wait for it to finish. In case waitpid() is interrupted, the parent exits with a fatal error. This is fine when the syscall is interrupted by a signal whose disposition is set to terminate the process, but not otherwise. In the apache2handler, the parent is the control process. Restarting apache2 is done by sending SIGUSR1 or SIGHUP to the control process. Doing that during the waitpid() would cause the control process to exit instead. Block the USR1 and HUP signals from being delivered during the syscall when running the apache2handler SAPI, as these are not supposed to terminate the process. FPM is fine as it masks relevant signals during php startup.

« previous php.git-pulls (#33505) next »