3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-19 10:29:30 +01: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"; $self->{output} = "[$self->{output}]\n";
} }
my $input_quoted = quotemeta $self->{input}; open my $fh, '>', '.input';
$input_quoted =~ s/\\"/"'\\"'"/g; print $fh $self->{input};
my ($retval, $result) = $self->execute(60, "bash -c \"date -s \@$self->{date}; ulimit -t 1; /home/compiler/prog <<< echo $input_quoted > .output\""); 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; $self->{error} = $retval;