From: Marius Gavrilescu Date: Tue, 3 Feb 2015 16:20:06 +0000 (+0200) Subject: Print debug information in gruntmaster-exec only when needed X-Git-Tag: 5999.000_005~60 X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=commitdiff_plain;h=16de3659fc10d654c8b8c9e660393c1f25eb85d0 Print debug information in gruntmaster-exec only when needed --- diff --git a/gruntmaster-exec b/gruntmaster-exec index 5a2773a..bcde8d7 100755 --- a/gruntmaster-exec +++ b/gruntmaster-exec @@ -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; }