From 71727f8a67f68755aeb38d525d5b69751c8a7094 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Thu, 20 Feb 2014 19:38:49 +0000 Subject: [PATCH] Merge r1542379 from trunk: PR: 54852. Only use a dummy_connection for idle processes Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1570327 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 4 ---- server/mpm_unix.c | 5 +++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index b0109dcc2e9..737984bd2f6 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.4.8 + *) prefork: Fix long delays when doing a graceful restart. + PR 54852 [Jim Jagielski, Arkadiusz Miskiewicz ] + *) FreeBSD: Disable IPv4-mapped listening sockets by default for versions 5+ instead of just for FreeBSD 5. PR 53824. [Jeff Trawick] diff --git a/STATUS b/STATUS index 5582f72c4ac..366989c3600 100644 --- a/STATUS +++ b/STATUS @@ -98,10 +98,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * prefork: PR: 54852. Only use a dummy_connection for idle processes - trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1542379 - 2.4.x patch: trunk patch works mod CHANGES - +1: jim, covener, humbedooh PATCHES PROPOSED TO BACKPORT FROM TRUNK: diff --git a/server/mpm_unix.c b/server/mpm_unix.c index 063af725f4f..0000cb6672c 100644 --- a/server/mpm_unix.c +++ b/server/mpm_unix.c @@ -742,7 +742,12 @@ void ap_mpm_pod_killpg(ap_pod_t *pod, int num) * readers stranded (a number of them could be tied up for * a while serving time-consuming requests) */ + /* Recall: we only worry about IDLE child processes here */ for (i = 0; i < num && rv == APR_SUCCESS; i++) { + if (ap_scoreboard_image->servers[i][0].status != SERVER_READY || + ap_scoreboard_image->servers[i][0].pid == 0) { + continue; + } rv = dummy_connection(pod); } } -- 2.47.3