From: Joe Orton Date: Fri, 29 Jun 2007 08:43:29 +0000 (+0000) Subject: * server/mpm/prefork/prefork.c (reap_children), X-Git-Tag: 2.3.0~1745 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4fee126ccc3ee310a0bdc0b20298c9889d6af31;p=apache * server/mpm/prefork/prefork.c (reap_children), * 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 --- diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 6a51f657f7..c173601179 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -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... */ diff --git a/server/mpm_common.c b/server/mpm_common.c index 341f580bc4..aec41a065f 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -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;