From: Joe Orton Date: Fri, 18 Jan 2008 20:49:46 +0000 (+0000) Subject: * server/mpm_common.c (reclaim_one_pid): Retrieve the exit status from X-Git-Tag: 2.3.0~1020 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f73076edd1867d5f2a66194944afe39e4dfc1d66;p=apache * server/mpm_common.c (reclaim_one_pid): Retrieve the exit status from apr_proc_wait(); call ap_process_child_status() for children which terminate, to ensure that abnormal exits (e.g. SIGSEGV) are logged. PR: 42757 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@613263 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm_common.c b/server/mpm_common.c index 86ddc91c3c..36fe9ea588 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -126,6 +126,8 @@ static int reclaim_one_pid(pid_t pid, action_t action) { apr_proc_t proc; apr_status_t waitret; + apr_exit_why_e why; + int status; /* Ensure pid sanity. */ if (pid < 1) { @@ -133,8 +135,11 @@ static int reclaim_one_pid(pid_t pid, action_t action) } proc.pid = pid; - waitret = apr_proc_wait(&proc, NULL, NULL, APR_NOWAIT); + waitret = apr_proc_wait(&proc, &status, &why, APR_NOWAIT); if (waitret != APR_CHILD_NOTDONE) { +#ifdef AP_MPM_WANT_PROCESS_CHILD_STATUS + ap_process_child_status(&proc, why, status); +#endif return 1; }