]> andersk Git - moira.git/commitdiff
WIFEXITED(waitb) is true if the script exits even with exit 0.
authorjweiss <jweiss>
Tue, 17 Oct 1995 22:58:27 +0000 (22:58 +0000)
committerjweiss <jweiss>
Tue, 17 Oct 1995 22:58:27 +0000 (22:58 +0000)
changed so we only return an error if something other than an exit 0
occurs.  Note that the error returned in the case of death doe to a signal
will be a bogus error.

update/exec_002.c

index 03188efcd65ea1a2172aa9029a02d2dae947f93a..34c0cce49978a5a71f3c48fb23e054709b582f61 100644 (file)
@@ -110,7 +110,13 @@ exec_002(str)
        sigsetmask(mask);
 #endif
 #ifdef POSIX
-       if (WIFEXITED(waitb)) {
+       if ( (WIFEXITED(waitb) && (WEXITSTATUS(waitb)!=0)) || WIFSIGNALED(waitb)  ) {
+           /* This is not really correct.  It will cause teh moira server to
+              report a bogus error message if the script died on a signal.
+              However this is the same thing that occurs in the non-POSIX
+              case, and I don't know how to come up with a useful error based
+              on the signal recieved.
+           */
            n = WEXITSTATUS(waitb) + ERROR_TABLE_BASE_sms;
            log_priority = log_ERROR;
            com_err(whoami, n, " child exited with status %d",
This page took 0.040279 seconds and 5 git commands to generate.