Enforce CPU limit on expand_macro module

This commit is contained in:
Pragmatic Software 2014-08-03 22:02:36 +00:00
parent bc871bf4b2
commit 55bdc5b930
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;