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.
You could also use
supervisorctl shutdown
. If you run shutdown from within the supervisorctl shell, you get prompted for confirmation. From a bash shell, there is no prompt and supervisord exits.