From 2c5f313d2b38607b8497bdcfcd7e540ba4b54013 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 29 Jan 2018 15:30:06 +0100 Subject: [PATCH] updated: daemon traps and exit management --- daemon | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/daemon b/daemon index 15cfdb8..f4c8b9c 100755 --- a/daemon +++ b/daemon @@ -18,8 +18,7 @@ touch $ROOT/.lock; # (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 "kill -9 $SERV_PID 2>/dev/null; pkill nc 2>/dev/null; rm $ROOT/.lock 2>/dev/null; exit 1;" KILL; +trap "rm $ROOT/.lock 2>/dev/null; exit 1;" INT 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 # $ROOT/com/trigger 9999; -# (2) Launch server in background # +# (2) Launch server # $ROOT/com/launch ioemu $SATS_IP 44440 44441; \ No newline at end of file