- if (!st->expecting_userv_exit) {
- if (WIFEXITED(status)) {
- fatal("%s: userv exited unexpectedly with status %d",
- st->slip.nl.name,WEXITSTATUS(status));
- } else if (WIFSIGNALED(status)) {
- fatal("%s: userv exited unexpectedly: uncaught signal %d",
- st->slip.nl.name,WTERMSIG(status));
- } else {
- fatal("%s: userv stopped unexpectedly",
- st->slip.nl.name);
- }
+ if (!(st->expecting_userv_exit &&
+ (!status ||
+ (WIFSIGNALED(status) && WTERMSIG(status)==SIGTERM)))) {
+ lg_exitstatus(0,st->slip.nl.name,0,
+ st->expecting_userv_exit ? M_WARNING : M_FATAL,
+ status,"userv");