pcntl_wait not interrupted by SIGTERM
问题 According to the PHP docs for pcntl_wait, The wait function suspends execution of the current process until a child has exited, or until a signal is delivered whose action is to terminate the current process or to call a signal handling function. However, when I run the following code and send SIGTERM to the parent process with kill -s SIGTERM [pid] the signal handler is only called after the child exits (i.e. I have to wait for the sleep to finish. Shouldn't pcntl_wait() be interrupted by