3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-20 02:49:49 +01:00

compiler_vm: Remove bash -c from exec

This commit is contained in:
Pragmatic Software 2017-11-27 02:08:25 -08:00
parent 5f1dd143d2
commit 6d7df6901f

View File

@ -48,7 +48,7 @@ sub preprocess {
close $fh; close $fh;
print "Executing [$self->{cmdline}] without print_last_statement\n"; print "Executing [$self->{cmdline}] without print_last_statement\n";
my ($retval, $result) = $self->execute(60, "bash -c \"date -s \@$self->{date} > /dev/null; ulimit -t 5; $self->{cmdline}\""); my ($retval, $result) = $self->execute(60, "date -s \@$self->{date} > /dev/null; ulimit -t 5; $self->{cmdline}");
$self->{output} = $result; $self->{output} = $result;
$self->{error} = $retval; $self->{error} = $retval;
@ -59,7 +59,7 @@ sub preprocess {
close $fh; close $fh;
print "Executing [$self->{cmdline}] with print_last_statement\n"; print "Executing [$self->{cmdline}] with print_last_statement\n";
my ($retval, $result) = $self->execute(60, "bash -c \"date -s \@$self->{date} > /dev/null; ulimit -t 5; $self->{cmdline}\""); my ($retval, $result) = $self->execute(60, "date -s \@$self->{date} > /dev/null; ulimit -t 5; $self->{cmdline}");
} }
} else { } else {
open(my $fh, '>', $self->{sourcefile}) or die $!; open(my $fh, '>', $self->{sourcefile}) or die $!;
@ -67,7 +67,7 @@ sub preprocess {
close $fh; close $fh;
print "Executing [$self->{cmdline}]\n"; print "Executing [$self->{cmdline}]\n";
my ($retval, $result) = $self->execute(60, "bash -c \"date -s \@$self->{date} > /dev/null; ulimit -t 5; $self->{cmdline}\""); my ($retval, $result) = $self->execute(60, "date -s \@$self->{date} > /dev/null; ulimit -t 5; $self->{cmdline}");
$self->{output} = $result; $self->{output} = $result;
$self->{error} = $retval; $self->{error} = $retval;
} }