Closed
Description
Since PHP internally executes all commands using sh -c "original cmd"
a call to ->stop()
does not actually stop our process, but instead stops sh -c
while the real process can still continue running.
I'm not sure what the best fix is here, we could add an exec
call in front of the command to remove the sh -c
wrapper and directly control our process.
Another improvement in the stop() method would be to send a final SIGKILL
signal if the process does not terminate after sending SIGTERM
. But that would only make sense if we actually send this signal to the real process, not to the wrapper.