You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by pq...@apache.org on 2008/11/01 07:14:12 UTC

svn commit: r709655 - /httpd/httpd/trunk/server/mpm/simple/simple_run.c

Author: pquerna
Date: Fri Oct 31 23:14:12 2008
New Revision: 709655

URL: http://svn.apache.org/viewvc?rev=709655&view=rev
Log:
Reset the timers when in the child -- this prevents a fork bomb, as each child would spawn N more children of its own, as the scheduled timer would go off in the child and the parent.

Modified:
    httpd/httpd/trunk/server/mpm/simple/simple_run.c

Modified: httpd/httpd/trunk/server/mpm/simple/simple_run.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_run.c?rev=709655&r1=709654&r2=709655&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_run.c (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_run.c Fri Oct 31 23:14:12 2008
@@ -281,6 +281,12 @@
         return rv;
     }
 
+    /* XXXXX: Hack. Reseting parts of the simple core needs to be more
+     * thought out than this. 
+     */
+    APR_RING_INIT(&sc->timer_ring, simple_timer_t, link);
+    APR_RING_INIT(&sc->dead_timer_ring, simple_timer_t, link);
+
     rv = simple_setup_workers(sc);
     if (rv) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,