From 7b7cd69fb7e5fbeeaec79c9480e3707d5d99b246 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Mon, 23 Jul 2012 12:24:08 +0000 Subject: [PATCH] Merge r1363183 from trunk: fix child exit status in prefork after certain errors in the child so that the parent resets the spawn rate to the minimum or: mpm_prefork: Reduce spawn rate after a child process exits due to unexpected poll or accept failure. Submitted by: trawick Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1364607 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 6 ------ server/mpm/prefork/prefork.c | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index e836d77d92..d7dc9f34e1 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,9 @@ Changes with Apache 2.4.3 LoadModule and the file cannot be found in the server root directory, try to use the standard dlopen() search path. [Stefan Fritsch] + *) mpm_prefork: Reduce spawn rate after a child process exits due to + unexpected poll or accept failure. [Jeff Trawick] + *) core: Log value of Status header line in script responses rather than the fixed header name. [Chris Darroch] diff --git a/STATUS b/STATUS index 892dc68d57..aefbe7d9fa 100644 --- a/STATUS +++ b/STATUS @@ -100,12 +100,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: 2.4.x patch: trunk patch works (needs CHANGES entry) +1: sf, rjung, jim - * mpm_prefork: Reduce spawn rate after a child process exits due to - unexpected poll or accept failure. - trunk patch: http://svn.apache.org/viewvc?rev=1363183&view=rev - 2.4.x patch: trunk patch works - +1: trawick, rjung, jim - * mpm_event, mpm_worker: Fix cases where the spawn rate wasn't reduced after child process resource shortages. trunk patch: http://svn.apache.org/viewvc?rev=1363440&view=rev diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 5de88e3254..2b4f97bd8f 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -641,7 +641,7 @@ static void child_main(int child_num_arg) ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf, APLOGNO(00158) "apr_pollset_poll: (listen)"); SAFE_ACCEPT(accept_mutex_off()); - clean_child_exit(1); + clean_child_exit(APEXIT_CHILDSICK); } /* We can always use pdesc[0], but sockets at position N @@ -678,7 +678,7 @@ static void child_main(int child_num_arg) if (status == APR_EGENERAL) { /* resource shortage or should-not-occur occured */ - clean_child_exit(1); + clean_child_exit(APEXIT_CHILDSICK); } else if (status != APR_SUCCESS) { continue; -- 2.50.1