mirror of
https://github.com/pragma-/pbot.git
synced 2025-05-07 23:27:28 +02:00
Enforce CPU limit on expand_macro module
This commit is contained in:
parent
bc871bf4b2
commit
55bdc5b930
@ -13,8 +13,8 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 759,
|
BUILD_REVISION => 760,
|
||||||
BUILD_DATE => "2014-08-02",
|
BUILD_DATE => "2014-08-03",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -286,7 +286,7 @@ open my $fh, ">prog.c" or die "Couldn't write prog.c: $!";
|
|||||||
print $fh $code;
|
print $fh $code;
|
||||||
close $fh;
|
close $fh;
|
||||||
|
|
||||||
my ($ret, $result) = execute(5, "gcc -E prog.c");
|
my ($ret, $result) = execute(2, "bash -c \"ulimit -t 1; gcc -E prog.c\"");
|
||||||
|
|
||||||
$result =~ s/.*# \d+ "prog.c"(\s+\d+)*//ms;
|
$result =~ s/.*# \d+ "prog.c"(\s+\d+)*//ms;
|
||||||
$result =~ s/^#.*$//gm;
|
$result =~ s/^#.*$//gm;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user