From 84c3fdd8fafb636a22ea21593b2724c2ca88b2a8 Mon Sep 17 00:00:00 2001 From: nemunaire Date: Fri, 21 Nov 2014 10:20:59 +0100 Subject: [PATCH] Catch some SIG to kill sons --- launch.sh | 2 ++ launch_local.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/launch.sh b/launch.sh index aabe646f..f99b81e4 100755 --- a/launch.sh +++ b/launch.sh @@ -25,6 +25,8 @@ TMPF=`mktemp` tail -f "$TMPF" | ./gen_site.pl -d -s /tmp/test.sock -o ./out ERRORS HOME all DS & KP2=$! +trap "kill $KP1 $KP2; rm -rf '$TMPF'; echo" SIGINT SIGTERM + while ! [ -f /tmp/stop ]; do ./synchro.sh delete diff --git a/launch_local.sh b/launch_local.sh index d4850c12..87b5a8f1 100755 --- a/launch_local.sh +++ b/launch_local.sh @@ -25,6 +25,8 @@ TMPF=`mktemp` tail -f "$TMPF" | ./gen_site.pl -d -s /tmp/test.sock -bt /challenge/ -ba /challenge-admin/ -o ./out ERRORS HOME all DS & KP2=$! +trap "kill $KP1 $KP2; rm -rf '$TMPF'; echo" SIGINT SIGTERM + while ! [ -f /tmp/stop ]; do if [ `ls submission | wc -l` -gt 1 ]