diff options
author | Andrew Gaffney <agaffney@gentoo.org> | 2008-01-06 22:10:00 +0000 |
---|---|---|
committer | Andrew Gaffney <agaffney@gentoo.org> | 2008-01-06 22:10:00 +0000 |
commit | 3b309e0a28e1b80d61db6073289f2ab90df62c56 (patch) | |
tree | 132a3671fdd39d97ed7819a617c4485a7688218d | |
parent | check proper variable after forking (diff) | |
download | scire-3b309e0a28e1b80d61db6073289f2ab90df62c56.tar.gz scire-3b309e0a28e1b80d61db6073289f2ab90df62c56.tar.bz2 scire-3b309e0a28e1b80d61db6073289f2ab90df62c56.zip |
exit with -2 if run_as user can't be found
always try to get exitstatus
svn path=/branches/new-fu/; revision=340
-rw-r--r-- | client/Scire/Job.pm | 7 |
1 files 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 |