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 maste
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
show more ...
|