Killing supervisor if any of it's child processes fail
The trick is to only register the listener for events that indicate failure, namely
- PROCESS_STATE_STOPPED
- PROCESS_STATE_EXITED
- PROCESS_STATE_FATAL
Once they do, we should send a SIGQUIT
to Supervisor.
Here's a small improvement:
-SIGQUIT
rather than hard-coding the signal name$PPID
to get the PID ofsupervisord
(the parent of the event listener)