Compare commits
No commits in common. "75df2530e34fa47cc3ca7141ade909e9082eb030" and "94583cdcca610d73f979c5b5812b772fbabcf6b1" have entirely different histories.
75df2530e3
...
94583cdcca
1 changed files with 1 additions and 14 deletions
15
syslogize.sh
15
syslogize.sh
|
@ -17,17 +17,4 @@ if test $# -eq 0 ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LOGGER="${LOGGER:--t $1}"
|
$@ 2>&1 | logger ${LOGGER}
|
||||||
|
|
||||||
propagate_signal () {
|
|
||||||
logger ${LOGGER} "Received $1 signal"
|
|
||||||
jobs -p | xargs kill -$1
|
|
||||||
}
|
|
||||||
|
|
||||||
for signal in HUP INT QUIT USR1 USR2 TERM; do
|
|
||||||
trap "propagate_signal ${signal}" ${signal}
|
|
||||||
done
|
|
||||||
|
|
||||||
$@ 2>&1 | logger ${LOGGER} &
|
|
||||||
|
|
||||||
wait $!
|
|
||||||
|
|
Loading…
Reference in a new issue