projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ee3ba9
)
set CPU limit, in case the alarm handler will be ignored, MKWS-157
author
Wolfram Schneider
<wosch@indexdata.dk>
Fri, 27 Jun 2014 09:36:17 +0000
(11:36 +0200)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Fri, 27 Jun 2014 09:38:07 +0000
(11:38 +0200)
test/bin/bomb.pl
patch
|
blob
|
history
diff --git
a/test/bin/bomb.pl
b/test/bin/bomb.pl
index
6211eab
..
4ce8590
100755
(executable)
--- a/
test/bin/bomb.pl
+++ b/
test/bin/bomb.pl
@@
-6,6
+6,7
@@
use Getopt::Long;
use POSIX ":sys_wait_h";
+use BSD::Resource qw/setrlimit/;
use strict;
use warnings;
@@
-38,6
+39,10
@@
my @system = @ARGV;
die usage if $help;
die usage if !@system;
+# set CPU limit, in case the alarm handler will
+# be ignored
+setrlimit(RLIMIT_CPU, $timeout, 2*$timeout) or die "Cannot set CPU limit: $!\n";
+
#
# use fork/exec instead system()
#
@@
-54,4
+59,3
@@
if ($pid) {
else { }
1;
-