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",