From: Jim Jagielski Date: Sat, 31 May 2008 11:57:54 +0000 (+0000) Subject: Merge r552029 from trunk: X-Git-Tag: 2.2.9~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c785e2ab165c50ad04844c08f88dc0d6615a5c0;p=thirdparty%2Fapache%2Fhttpd.git Merge r552029 from trunk: * server/mpm/prefork/prefork.c (child_main): Stop processing new connections if shutdown_pending is set, i.e. when SIGTERM is received in single-proecss mode. Submitted by: Garrett Rooney PR: 38848 Submitted by: jorton Reviewed by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@662012 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index ace5896f879..b751e4afbb9 100644 --- a/STATUS +++ b/STATUS @@ -107,15 +107,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: Trunk version of patch works +1: jim, jorton, rpluem - * prefork: Stop processing new connections if shutdown_pending is set, - i.e. when SIGTERM is received in single-process mode. - PR 38848 - Trunk version of patch: - http://svn.apache.org/viewvc?view=rev&revision=552029 - Backport version for 2.2.x of patch: - Trunk version of patch works - +1: jim, jorton, rpluem - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index d3c93a63f68..ada2990fc3a 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -536,7 +536,10 @@ static void child_main(int child_num_arg) bucket_alloc = apr_bucket_alloc_create(pchild); - while (!die_now) { + /* die_now is set when AP_SIG_GRACEFUL is received in the child; + * shutdown_pending is set when SIGTERM is received when running + * in single process mode. */ + while (!die_now && !shutdown_pending) { conn_rec *current_conn; void *csd;