Catch some SIG to kill sons

This commit is contained in:
nemunaire 2014-11-21 10:20:59 +01:00
parent 65edeb149d
commit 84c3fdd8fa
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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 ]