Skip to content
Snippets Groups Projects
Commit 5e86a605 authored by Michal Sojka's avatar Michal Sojka
Browse files

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.
parent 94787176
No related branches found
No related tags found
No related merge requests found
......@@ -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: $!");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment