]> granicus.if.org Git - apache/commitdiff
* server/mpm_common.c (reclaim_one_pid): Retrieve the exit status from
authorJoe Orton <jorton@apache.org>
Fri, 18 Jan 2008 20:49:46 +0000 (20:49 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 18 Jan 2008 20:49:46 +0000 (20:49 +0000)
  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

server/mpm_common.c

index 86ddc91c3c79b420644ebe858ffb4a857beb8451..36fe9ea588907104aea3f9ca9231b3391b0fe3c1 100644 (file)
@@ -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;
     }