From: Michal Sojka Date: Thu, 10 Apr 2014 16:33:18 +0000 (+0200) Subject: continuous: Kill the boot process when various signals are received X-Git-Tag: fix-allnoconfig~1 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/5e86a605b58d5c3717b81528df44c73d9d1aaf25 continuous: Kill the boot process when various signals are received This is needed when run.pl is run under timeout utility. It sends the TERM signal to the children. --- diff --git a/continuous/gw-setup/run.pl b/continuous/gw-setup/run.pl index f594fad..47997d4 100755 --- a/continuous/gw-setup/run.pl +++ b/continuous/gw-setup/run.pl @@ -47,6 +47,10 @@ sub run_boot() my $bootcmd = scalar @ARGV ? "'".join("' '", @ARGV)."'" : "$FindBin::Bin/boot"; $SIG{INT} = sub { kill_boot(); exit; }; + $SIG{HUP} = sub { kill_boot(); exit; }; + $SIG{ALRM} = sub { kill_boot(); exit; }; + $SIG{TERM} = sub { kill_boot(); exit; }; + $SIG{QUIT} = sub { kill_boot(); exit; }; pipe($boot, $wh) || die("pipe: $!"); my $pid = fork() // die("fork: $!");