1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-18 15:30:21 +00:00

When printing the wait status, break it down into a signal and a exit status.

PR:		41912
Submitted by:	Aaron Smith <aaron@mutex.org>
MFC after:	2 weeks
This commit is contained in:
David Malone 2002-09-04 21:00:45 +00:00
parent 85d28cb43f
commit 7718f45c22
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102939

View File

@ -917,7 +917,10 @@ reapchild(void)
if (pid <= 0)
break;
if (debug)
warnx("%d reaped, status %#x", pid, status);
warnx("%d reaped, %s %u", pid,
WIFEXITED(status) ? "status" : "signal",
WIFEXITED(status) ? WEXITSTATUS(status)
: WTERMSIG(status));
for (sep = servtab; sep; sep = sep->se_next) {
for (k = 0; k < sep->se_numchild; k++)
if (sep->se_pids[k] == pid)
@ -927,10 +930,13 @@ reapchild(void)
if (sep->se_numchild == sep->se_maxchild)
enable(sep);
sep->se_pids[k] = sep->se_pids[--sep->se_numchild];
if (status)
if (WIFSIGNALED(status) || WEXITSTATUS(status))
syslog(LOG_WARNING,
"%s[%d]: exit status 0x%x",
sep->se_server, pid, status);
"%s[%d]: exited, %s %u",
sep->se_server, pid,
WIFEXITED(status) ? "status" : "signal",
WIFEXITED(status) ? WEXITSTATUS(status)
: WTERMSIG(status));
break;
}
reapchild_conn(pid);