summaryrefslogtreecommitdiff
path: root/common/tests
diff options
context:
space:
mode:
authorOlivier Dufour2013-05-23 13:49:40 +0200
committerOlivier Dufour2013-05-30 16:06:32 +0200
commit886502eccf84d52280a2b55cc501cd1b52dabae5 (patch)
tree631e7186f82fae3a7cabb10b1df9d06171ffcd3a /common/tests
parentcfe45b6e021caff6b3c604e31063ab1b3a6b0f5d (diff)
common/tests: timeout action kills all the children of the process, refs #3997
Diffstat (limited to 'common/tests')
-rwxr-xr-xcommon/tests/run-test.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/tests/run-test.pl b/common/tests/run-test.pl
index 6389f34d34..5b75bff2df 100755
--- a/common/tests/run-test.pl
+++ b/common/tests/run-test.pl
@@ -228,6 +228,7 @@ sub timed_system
if ($pid == 0)
{
# Son.
+ setpgrp ($$, $$);
exec $cmd;
exit 128;
}
@@ -245,7 +246,7 @@ sub timed_system
die unless $@ eq "alarm\n";
kill INT => $pid;
sleep 3;
- kill KILL => $pid;
+ kill KILL => -$pid;
print "Timed out!\n";
return $signum{ALRM};
}