updated: daemon traps and exit management

This commit is contained in:
xdrm-brackets 2018-01-29 15:30:06 +01:00
parent c82f0fee49
commit 2c5f313d2b
1 changed files with 2 additions and 3 deletions

5
daemon
View File

@ -18,8 +18,7 @@ touch $ROOT/.lock;
# (2) Set traps before starting any subproccess # (2) Set traps before starting any subproccess
#--------------------------------------------------------# #--------------------------------------------------------#
trap "kill -9 $SERV_PID 2>/dev/null; pkill nc 2>/dev/null; rm $ROOT/.lock 2>/dev/null; exit 1;" INT; trap "rm $ROOT/.lock 2>/dev/null; exit 1;" INT KILL;
trap "kill -9 $SERV_PID 2>/dev/null; pkill nc 2>/dev/null; rm $ROOT/.lock 2>/dev/null; exit 1;" KILL;
@ -28,5 +27,5 @@ trap "kill -9 $SERV_PID 2>/dev/null; pkill nc 2>/dev/null; rm $ROOT/.lock 2>/dev
# (1) Wait for trigger # # (1) Wait for trigger #
$ROOT/com/trigger 9999; $ROOT/com/trigger 9999;
# (2) Launch server in background # # (2) Launch server #
$ROOT/com/launch ioemu $SATS_IP 44440 44441; $ROOT/com/launch ioemu $SATS_IP 44440 44441;