From 3b309e0a28e1b80d61db6073289f2ab90df62c56 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sun, 6 Jan 2008 22:10:00 +0000 Subject: exit with -2 if run_as user can't be found always try to get exitstatus svn path=/branches/new-fu/; revision=340 --- client/Scire/Job.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/Scire/Job.pm b/client/Scire/Job.pm index 913e3de..0b016dc 100644 --- a/client/Scire/Job.pm +++ b/client/Scire/Job.pm @@ -62,10 +62,10 @@ sub run { # called something like is_running() and use WNOHANG instead of blocking waitpid($pid, 0); my $status = $?; - my $exitcode = -1; - if(WIFEXITED($status)) { +# my $exitcode = -1; +# if(WIFEXITED($status)) { my $exitcode = WEXITSTATUS($status); - } +# } return $exitcode; } else { # We redirect STDOUT and STDERR first since the new user may not have @@ -86,6 +86,7 @@ sub run { } else { # XXX: the specified user does not exist. we should really do # something here + exit(-2); } } # XXX: exec() to run our command. our STDOUT and STDERR have been -- cgit v1.2.3-65-gdbad