From 5e86a605b58d5c3717b81528df44c73d9d1aaf25 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 10 Apr 2014 18:33:18 +0200 Subject: [PATCH] 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. --- continuous/gw-setup/run.pl | 4 ++++ 1 file changed, 4 insertions(+) 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: $!"); -- 2.39.2