]> granicus.if.org Git - apache/commitdiff
* server/mpm/prefork/prefork.c (reap_children),
authorJoe Orton <jorton@apache.org>
Fri, 29 Jun 2007 08:43:29 +0000 (08:43 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 29 Jun 2007 08:43:29 +0000 (08:43 +0000)
* server/mpm_common.c (ap_wait_or_timeout): Remove dead code; NEED_WAITPID
has never been defined by the 2.x build system.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551823 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/prefork/prefork.c
server/mpm_common.c

index 6a51f657f7d2b57648742b158e96e16845cb38f2..c173601179a66675a54afb29e74bd5cc69a3abac 100644 (file)
@@ -295,34 +295,6 @@ AP_DECLARE(apr_status_t) ap_mpm_query(int query_code, int *result)
     return APR_ENOTIMPL;
 }
 
-#if defined(NEED_WAITPID)
-/*
-   Systems without a real waitpid sometimes lose a child's exit while waiting
-   for another.  Search through the scoreboard for missing children.
- */
-int reap_children(int *exitcode, apr_exit_why_e *status)
-{
-    int n, pid;
-
-    for (n = 0; n < ap_max_daemons_limit; ++n) {
-        pid = ap_scoreboard_image->parent[n].pid;
-        if (ap_scoreboard_image->servers[n][0].status != SERVER_DEAD) {
-            if (ap_in_pid_table(pid)) {
-                if (kill(pid, 0) == -1) {
-                    ap_update_child_status_from_indexes(n, 0, SERVER_DEAD, NULL);
-                    /* just mark it as having a successful exit status */
-                    *status = APR_PROC_EXIT;
-                    *exitcode = 0;
-                    ap_unset_pid_table(pid);
-                    return(pid);
-                }
-            }
-        }
-    }
-    return 0;
-}
-#endif
-
 /*****************************************************************
  * Connection structures and accounting...
  */
index 341f580bc42334fe1ac815d7f95bbfa81f74dd8c..aec41a065fecc5bbd1404f623cc7b05e8614fe54 100644 (file)
@@ -376,12 +376,6 @@ void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret,
         return;
     }
 
-#ifdef NEED_WAITPID
-    if ((ret = reap_children(exitcode, status)) > 0) {
-        return;
-    }
-#endif
-
     apr_sleep(SCOREBOARD_MAINTENANCE_INTERVAL);
     ret->pid = -1;
     return;