X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=gruntmaster-exec;fp=gruntmaster-exec;h=97ac555311340538bb1271704b6a63fbf1c3b704;hp=d2807656d506909f27e14d68897b2317f20c4f53;hb=1cebb7de90ce9e5a25ef5805ff9b54936f64ac71;hpb=0ad36cae798f1d0698bfea2130f29707ee2a47e9 diff --git a/gruntmaster-exec b/gruntmaster-exec index d280765..97ac555 100755 --- a/gruntmaster-exec +++ b/gruntmaster-exec @@ -58,7 +58,6 @@ sub test_pipes { $ARGV[0] =~ /prog/ ? test_pipe_read : test_pipe_write } -my $killuser = $ENV{GRUNTMASTER_KILL_USER}; my @sudo; @sudo = (shellwords ($ENV{GRUNTMASTER_SUDO}), '--') if $ENV{GRUNTMASTER_SUDO} && $sudo; undef $mlimit if @sudo; # sudo wants a lot of address space @@ -73,11 +72,7 @@ if ($ret) { exit !say ERR, "\nNo response from gruntmaster-exec child"; } local $SIG{ALRM} = sub { - if ($killuser) { - system @sudo, 'pkill', '-KILL', '-u', $killuser; - } else { - kill KILL => $ret - } + kill KILL => $ret; $tle = 1 }; alarm ($timeout || 10); @@ -108,7 +103,7 @@ if ($ret) { } } test_pipes if grep /tty|fifo/, @fds; - my $nproc = $killuser ? 15 : 1; + my $nproc = 15; my $debug = $ENV{TEST_VERBOSE}; %ENV = (ONLINE_JUDGE => 1, PATH => $ENV{PATH}, HOME => $ENV{HOME}); setrlimit RLIMIT_AS, $mlimit, $mlimit or die $! if $mlimit;