httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r709655 - /httpd/httpd/trunk/server/mpm/simple/simple_run.c
Date Sat, 01 Nov 2008 06:14:12 GMT
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,



Mime
View raw message