1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 08:42:29 +01:00
Files
archived-php-src/sapi/fpm/tests
Maksim Nikulin e37bd5dcc2 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
2019-11-17 14:46:56 +00:00
..
2018-06-12 17:59:28 +01:00
2018-06-12 17:59:28 +01:00
2019-05-31 10:54:41 +02:00
2018-07-09 12:49:19 +03:00
2018-06-12 17:59:28 +01:00
2018-06-12 17:59:28 +01:00
2018-06-12 17:59:28 +01:00
2018-06-12 17:59:28 +01:00
2018-06-12 17:59:28 +01:00
2018-06-12 17:59:28 +01:00
2019-10-21 13:17:27 -07:00