I have a Bash script “script” which roughly looks like:
#!/bin/bash
cmd1 | cmd2 | cmd3
When I do a kill script (or more precisely when I do a ‘stop script’ in supervisord), not all cmd* are killed. How can I make sure they are terminated along with the script that spawned them?
Supervisord has stopasgroup and killasgroup options (false by default) which determine whether to propagate SIGTERM/SIGKILL signals to child processes.
(These config variables are both documented at http://supervisord.org/configuration.html.)