}
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);
}
#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;