X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=gruntmaster-exec;h=bcde8d721321899e0f65cf317ecf8d3d697f4a7e;hp=25a44d16f48f8635b58868a9f2c9695dab7caf45;hb=16de3659fc10d654c8b8c9e660393c1f25eb85d0;hpb=1e5f2b8b348c178a0656f9515917223c49d010d3 diff --git a/gruntmaster-exec b/gruntmaster-exec index 25a44d1..bcde8d7 100755 --- a/gruntmaster-exec +++ b/gruntmaster-exec @@ -46,7 +46,7 @@ GetOptions( my $killuser = $ENV{GRUNTMASTER_KILL_USER}; my @sudo; @sudo = (shellwords ($ENV{GRUNTMASTER_SUDO}), '--') if $ENV{GRUNTMASTER_SUDO} && $nobody; -$mlimit = 1_000_000_000 if @sudo; # sudo wants a lot of address space +undef $mlimit if @sudo; # sudo wants a lot of address space my $ret = fork // die 'Cannot fork'; if ($ret) { @@ -88,6 +88,7 @@ if ($ret) { } } my $nproc = $killuser ? 5 : 1; + my $debug = $ENV{TEST_VERBOSE}; %ENV = (ONLINE_JUDGE => 1, PATH => $ENV{PATH}, HOME => $ENV{HOME}); setrlimit RLIMIT_AS, $mlimit, $mlimit or die $! if $mlimit; setrlimit RLIMIT_FSIZE, $olimit, $olimit or die $! if $olimit; @@ -95,7 +96,7 @@ if ($ret) { POSIX::setgid $nobody ? 65534 : USER; POSIX::setuid $nobody ? 65534 : GROUP; unshift @ARGV, @sudo; - say STDERR "Execing: ", join ' ', map { "'$_'" } @ARGV; + say STDERR "Executing: ", join ' ', map { "'$_'" } @ARGV if $debug; exec @ARGV; }