From: Jeff Trawick Date: Mon, 24 Jul 2006 01:34:58 +0000 (+0000) Subject: merge from trunk: X-Git-Tag: 2.2.3~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f70d9e2736950d56bfd02d6b6f0911c006ae58d;p=thirdparty%2Fapache%2Fhttpd.git merge from trunk: worker and event MPMs: fix excessive forking if fork() or child_init take a long time. PR: 39275 Reviewed by: trawick, gregames, pquerna git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@424874 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index b7720b9f941..70eb9189b7b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.3 + *) worker and event MPMs: fix excessive forking if fork() or child_init + take a long time. PR 39275. + [Greg Ames, Jeff Trawick, Chris Darroch ] + *) configure: Add "--with-included-apr" flag to force use of the bundled version of APR at build time. [Joe Orton] diff --git a/STATUS b/STATUS index 3b7de88de38..57ce6aa4060 100644 --- a/STATUS +++ b/STATUS @@ -153,8 +153,3 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK: ways how to fix this and take care about the flush buckets. I am willing to propose patches, but due to personal time constraints they will not show up before the second half of July. - - * worker and event MPMs: fix excessive forking if fork() or child_init - take a long time. PR 39275. - http://svn.apache.org/viewvc?view=rev&revision=399099 - +1: trawick, gregames, pquerna diff --git a/server/mpm/experimental/event/event.c b/server/mpm/experimental/event/event.c index 43f6612629f..c47e857d9af 100644 --- a/server/mpm/experimental/event/event.c +++ b/server/mpm/experimental/event/event.c @@ -1665,7 +1665,7 @@ static void perform_idle_server_maintenance(void) */ if (ps->pid != 0) { /* XXX just set all_dead_threads in outer for loop if no pid? not much else matters */ - if (status <= SERVER_READY && status != SERVER_DEAD && + if (status <= SERVER_READY && !ps->quiescing && ps->generation == ap_my_generation) { ++idle_thread_count; } diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index ca6fa9216c7..142b7a42e14 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -1418,7 +1418,7 @@ static void perform_idle_server_maintenance(void) */ if (ps->pid != 0) { /* XXX just set all_dead_threads in outer for loop if no pid? not much else matters */ - if (status <= SERVER_READY && status != SERVER_DEAD && + if (status <= SERVER_READY && !ps->quiescing && ps->generation == ap_my_generation) { ++idle_thread_count;