Created
February 12, 2015 14:33
-
-
Save polonskiy/2c72dc9e02804912777c to your computer and use it in GitHub Desktop.
forward signals
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#enable job control | |
set -m | |
#propagate INT/TERM signals | |
trap 'kill -TERM $(jobs -p); wait' TERM | |
trap 'kill -INT $(jobs -p); wait' INT | |
#services | |
rsyslogd -n & | |
cron -f & | |
#wait for all children | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment