httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r551823 - in /httpd/httpd/trunk/server: mpm/prefork/prefork.c mpm_common.c
Date Fri, 29 Jun 2007 08:43:30 GMT
Author: jorton
Date: Fri Jun 29 01:43:29 2007
New Revision: 551823

URL: http://svn.apache.org/viewvc?view=rev&rev=551823
Log:
* 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.

Modified:
    httpd/httpd/trunk/server/mpm/prefork/prefork.c
    httpd/httpd/trunk/server/mpm_common.c

Modified: httpd/httpd/trunk/server/mpm/prefork/prefork.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/prefork/prefork.c?view=diff&rev=551823&r1=551822&r2=551823
==============================================================================
--- httpd/httpd/trunk/server/mpm/prefork/prefork.c (original)
+++ httpd/httpd/trunk/server/mpm/prefork/prefork.c Fri Jun 29 01:43:29 2007
@@ -295,34 +295,6 @@
     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...
  */

Modified: httpd/httpd/trunk/server/mpm_common.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm_common.c?view=diff&rev=551823&r1=551822&r2=551823
==============================================================================
--- httpd/httpd/trunk/server/mpm_common.c (original)
+++ httpd/httpd/trunk/server/mpm_common.c Fri Jun 29 01:43:29 2007
@@ -376,12 +376,6 @@
         return;
     }
 
-#ifdef NEED_WAITPID
-    if ((ret = reap_children(exitcode, status)) > 0) {
-        return;
-    }
-#endif
-
     apr_sleep(SCOREBOARD_MAINTENANCE_INTERVAL);
     ret->pid = -1;
     return;



Mime
View raw message