mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 12:32:37 +01: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
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 759,
|
||||
BUILD_DATE => "2014-08-02",
|
||||
BUILD_REVISION => 760,
|
||||
BUILD_DATE => "2014-08-03",
|
||||
};
|
||||
|
||||
1;
|
||||
|
@ -286,7 +286,7 @@ open my $fh, ">prog.c" or die "Couldn't write prog.c: $!";
|
||||
print $fh $code;
|
||||
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/^#.*$//gm;
|
||||
|
Loading…
Reference in New Issue
Block a user