From: Paul Querna Date: Sat, 1 Nov 2008 06:14:12 +0000 (+0000) Subject: Reset the timers when in the child -- this prevents a fork bomb, as each child would... X-Git-Tag: 2.3.0~186 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f01a7c687a30df61d0f193b47a4b5669dd13359;p=apache 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709655 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/simple/simple_run.c b/server/mpm/simple/simple_run.c index 3a77451a96..80bb9186f9 100644 --- a/server/mpm/simple/simple_run.c +++ b/server/mpm/simple/simple_run.c @@ -281,6 +281,12 @@ int simple_child_loop(simple_core_t * sc) 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,