]>
iEval git - gruntmaster-daemon.git/blob - lib/Gruntmaster/Daemon/Runner/Interactive.pm
1 package Gruntmaster
::Daemon
::Runner
::Interactive
;
7 use File
::Slurp qw
/slurp/;
8 use Gruntmaster
::Daemon
::Constants qw
/WA/;
9 use Log
::Log4perl qw
/get_logger/;
13 our $VERSION = '5999-TRIAL';
15 ##################################################
18 my ($test, $meta) = @_;
19 get_logger
->trace("Running on test $test...");
21 mkfifo
'fifo1', 0600 or die $! unless -e
'fifo1';
22 mkfifo
'fifo2', 0600 or die $! unless -e
'fifo2';
24 my $ret = fork // get_logger
->logdie("Fork failed: $!");
26 $meta->{files
}{prog
}{run
}->($meta->{files
}{prog
}{name
}, fds
=> [qw
/0 fifo1 1 >fifo2/], map {defined $meta->{$_} ?
($_ => $meta->{$_}) : () } qw
/timeout mlimit/);
28 die [WA
, "Wrong Answer"] if $?
;
31 $meta->{files
}{int}{run
}->($meta->{files
}{int}{name
}, fds
=> [qw
/1 >fifo1 0 fifo2 4 >result/]);
This page took 0.055806 seconds and 5 git commands to generate.