]> andersk Git - moira.git/blobdiff - update/exec_002.c
Remove all references to table locking, since
[moira.git] / update / exec_002.c
index c9239a519e6b82d19717f31ad33574282999f893..fcf0d96ff1437003f3b94aada4c684f686e65d80 100644 (file)
@@ -54,7 +54,7 @@ exec_002(str)
     }
     if (config_lookup("noexec")) {
        code = EPERM;
-       code = send_object(conn, (char *)&code, INTEGER_T);
+       send_object(conn, (char *)&code, INTEGER_T);
        com_err(whoami, code, "Not allowed to execute");
        return(0);
     }
@@ -115,16 +115,16 @@ exec_002(str)
 #endif
 #ifdef POSIX
        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",
-                   WEXITSTATUS(waitb));
+           if (WIFSIGNALED(waitb)) {
+               n = MR_COREDUMP;
+               com_err(whoami, n, " child exited on signal %d",
+                       WTERMSIG(waitb));
+           } else {
+               n = WEXITSTATUS(waitb) + ERROR_TABLE_BASE_sms;
+               com_err(whoami, n, " child exited with status %d",
+                       WEXITSTATUS(waitb));
+           }
 #else
        if (waitb.w_status) {
            n = waitb.w_retcode + ERROR_TABLE_BASE_sms;
This page took 1.225817 seconds and 4 git commands to generate.