Commit 8f488f9
Mask USR1/HUP while waiting for preloading
Preloading may fork and wait for the child to exit. 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 SAPI, the parent is the control process. Restarting
apache2 is done by sending SIGUSR1 or SIGHUP to the control process. Doing that
during the waitpid() syscall 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.
Fixes GH-20051
Closes GH-20079
Co-authored-by: mycozyhom <welcomycozyhom@gmail.com>1 parent ce7d4e7 commit 8f488f9
1 file changed
+33
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5090 | 5090 | | |
5091 | 5091 | | |
5092 | 5092 | | |
5093 | | - | |
| 5093 | + | |
| 5094 | + | |
| 5095 | + | |
| 5096 | + | |
| 5097 | + | |
| 5098 | + | |
| 5099 | + | |
| 5100 | + | |
| 5101 | + | |
| 5102 | + | |
| 5103 | + | |
| 5104 | + | |
| 5105 | + | |
| 5106 | + | |
| 5107 | + | |
| 5108 | + | |
| 5109 | + | |
| 5110 | + | |
| 5111 | + | |
| 5112 | + | |
| 5113 | + | |
| 5114 | + | |
| 5115 | + | |
| 5116 | + | |
5094 | 5117 | | |
| 5118 | + | |
5095 | 5119 | | |
5096 | 5120 | | |
5097 | 5121 | | |
5098 | 5122 | | |
5099 | 5123 | | |
| 5124 | + | |
| 5125 | + | |
| 5126 | + | |
| 5127 | + | |
| 5128 | + | |
| 5129 | + | |
| 5130 | + | |
| 5131 | + | |
5100 | 5132 | | |
5101 | 5133 | | |
5102 | 5134 | | |
| |||
0 commit comments