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:
parent
7aa59c430e
commit
90d152fcff
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue