summaryrefslogtreecommitdiff
path: root/sapi/apache2handler/php_functions.c
diff options
context:
space:
mode:
authorMaksim Nikulin <mnikulin@plesk.com>2019-10-21 14:23:29 +0700
committerJakub Zelenka <bukka@php.net>2019-11-17 14:46:56 +0000
commite37bd5dcc2e8f269c6031d86429311c8cf243060 (patch)
treea3a90d67c5ed62deba4609d69aede3e85db35bf3 /sapi/apache2handler/php_functions.c
parent3f4a15113c50d2e86a59db8d41fb0a102f43d1c2 (diff)
downloadphp-git-e37bd5dcc2e8f269c6031d86429311c8cf243060.tar.gz
Do not let PHP-FPM children miss SIGTERM, SIGQUIT
Postpone signal delivery while spawning children. Prevent the following case: - Reload (reexec) is in progress. - New master is forking to start enough children for pools where `pm` is not `on-demand`. - Another `SIGUSR2` is received by the master process. - Master process switches to reloading state. - Some child has not set its own signal handlers. - `SIGQUIT` and `SIGTERM` sent by master process are caught by signal handler set by master process and so they are ignored. - A child is running, it has no reason to finish Before pull request #4465 this scenario could cause deadlock, however with 0ed6c37140 reload finishes after `SIGKILL`. Use sigprocmask() around fork() to avoid race of delivery signal to children and setting of own signal handlers. Fixes bug #76601
Diffstat (limited to 'sapi/apache2handler/php_functions.c')
0 files changed, 0 insertions, 0 deletions