gsmd: Simplify killing of the children

Kill the entire process group by sending it to pid 0. Found while
searching for better exec examples.
This commit is contained in:
Holger Hans Peter Freyther 2013-03-15 22:52:16 +01:00
parent 7aa59c430e
commit 90d152fcff
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ PIDFILE="/var/run/$NAME.pid"
PID=$$
echo "$PID" > $PIDFILE
trap "{ rm -f $PIDFILE ; killall -9 $NAME; }" EXIT
trap "{ rm -f $PIDFILE ; kill 0; }" EXIT
while true;
do