3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-01 17:16:39 +02:00

Fix -input option for TenDRA

This commit is contained in:
Pragmatic Software 2015-01-25 13:28:46 -08:00
parent 0f00ceae95
commit 56a926603f

View File

@ -16,9 +16,11 @@ sub postprocess {
$self->{output} = "[$self->{output}]\n";
}
my $input_quoted = quotemeta $self->{input};
$input_quoted =~ s/\\"/"'\\"'"/g;
my ($retval, $result) = $self->execute(60, "bash -c \"date -s \@$self->{date}; ulimit -t 1; /home/compiler/prog <<< echo $input_quoted > .output\"");
open my $fh, '>', '.input';
print $fh $self->{input};
close $fh;
my ($retval, $result) = $self->execute(60, "bash -c \"date -s \@$self->{date}; ulimit -t 1; cat .input | /home/compiler/prog > .output\"");
$self->{error} = $retval;