mirror of
https://github.com/garywill/linux-router.git
synced 2025-11-10 22:04:04 +01:00
better cleanup
This commit is contained in:
parent
d1c8e7b260
commit
509eedf10f
3
lnxrouter
Executable file → Normal file
3
lnxrouter
Executable file → Normal file
@ -864,6 +864,7 @@ kill_processes() {
|
||||
pid=$(cat $x)
|
||||
pn=$( ps -p $pid -o comm= )
|
||||
#echo "Killing $pid $pn ... "
|
||||
pkill -P $pid
|
||||
kill $pid 2>/dev/null && ( echo "Killed $pid $pn" && rm $x ) || echo "Failed to kill $pid $pn, it may have exited"
|
||||
fi
|
||||
done
|
||||
@ -940,7 +941,7 @@ cleanup() {
|
||||
kill -15 -$pgid
|
||||
sleep 1
|
||||
echo "Cleaning up done"
|
||||
kill -9 -$pgid
|
||||
#kill -9 -$pgid
|
||||
}
|
||||
|
||||
die() { # SIGUSR2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user