mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-19 10:29:30 +01:00
Properly pass date to default VM languages
This commit is contained in:
parent
6fb1c3a142
commit
9608cac9cb
@ -45,8 +45,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, $self->{cmdline});
|
my ($retval, $result) = $self->execute(60, "bash -c \"date -s \@$self->{date} > /dev/null; ulimit -t 5; $self->{cmdline}\"");
|
||||||
|
|
||||||
$self->{output} = $result;
|
$self->{output} = $result;
|
||||||
$self->{error} = $retval;
|
$self->{error} = $retval;
|
||||||
|
|
||||||
@ -57,7 +56,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";
|
||||||
$self->execute(60, $self->{cmdline});
|
my ($retval, $result) = $self->execute(60, "bash -c \"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 $!;
|
||||||
@ -65,8 +64,7 @@ sub preprocess {
|
|||||||
close $fh;
|
close $fh;
|
||||||
|
|
||||||
print "Executing [$self->{cmdline}]\n";
|
print "Executing [$self->{cmdline}]\n";
|
||||||
my ($retval, $result) = $self->execute(60, $self->{cmdline});
|
my ($retval, $result) = $self->execute(60, "bash -c \"date -s \@$self->{date} > /dev/null; ulimit -t 5; $self->{cmdline}\"");
|
||||||
|
|
||||||
$self->{output} = $result;
|
$self->{output} = $result;
|
||||||
$self->{error} = $retval;
|
$self->{error} = $retval;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user