From 2f01a7c687a30df61d0f193b47a4b5669dd13359 Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Sat, 1 Nov 2008 06:14:12 +0000 Subject: [PATCH] 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 --- server/mpm/simple/simple_run.c | 6 ++++++ 1 file changed, 6 insertions(+) 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, -- 2.40.0