]> granicus.if.org Git - apache/commitdiff
prefork MPM: Run cleanups for final request when process exits gracefully.
authorJeff Trawick <trawick@apache.org>
Mon, 10 May 2010 20:47:59 +0000 (20:47 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 10 May 2010 20:47:59 +0000 (20:47 +0000)
PR: 43857
Submitted by: Tom Donovan, simplified slightly by me

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@942897 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/mpm/prefork/prefork.c

diff --git a/CHANGES b/CHANGES
index e7ec7a405a887db912fdb1eb4ec49c43fed17106..7bc155f7aa2d7a4580628f9d00b498c6c5c27316 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -28,6 +28,9 @@ Changes with Apache 2.3.7
      processing is completed, avoiding orphaned callback pointers.
      [Brett Gervasoni <brettg senseofsecurity.com>, Jeff Trawick]
 
+  *) prefork MPM: Run cleanups for final request when process exits gracefully.
+     PR 43857.  [Tom Donovan, Jeff Trawick]
+
   *) ab: fix number of requests sent by ab when keepalive is enabled.  PR 48497.
      [Bryn Dole <dole blekko.com>]
 
index 358a9997a11525be300b79e91c9242b708568c37..b1a93c070294f774375aca4fd525891b75be841b 100644 (file)
@@ -549,12 +549,6 @@ static void child_main(int child_num_arg)
         conn_rec *current_conn;
         void *csd;
 
-        /*
-         * (Re)initialize this child to a pre-connection state.
-         */
-
-        apr_pool_clear(ptrans);
-
         if ((ap_max_requests_per_child > 0
              && requests_this_child++ >= ap_max_requests_per_child)) {
             clean_child_exit(0);
@@ -668,6 +662,12 @@ static void child_main(int child_num_arg)
             ap_lingering_close(current_conn);
         }
 
+        /*
+         * (Re)initialize this child to a pre-connection state.
+         */
+
+        apr_pool_clear(ptrans);
+
         /* Check the pod and the generation number after processing a
          * connection so that we'll go away if a graceful restart occurred
          * while we were processing the connection or we are the lucky