]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) prefork: Update MPM state in children during a graceful restart.
authorJim Jagielski <jim@apache.org>
Thu, 10 Feb 2011 15:29:07 +0000 (15:29 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 10 Feb 2011 15:29:07 +0000 (15:29 +0000)
       Allow the HTTP connection handling loop to terminate early
            during a graceful restart.  PR 41743.
                 [Andrew Punch <andrew.punch 247realmedia.com>]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1069428 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/mpm/prefork/prefork.c

diff --git a/CHANGES b/CHANGES
index dc2bb3748080d28022b1d99bac4b794b286805b5..cb8fa910b7ea01879e8e3b3d8714b1e67ee7b649 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,12 +1,22 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.18
 
+  *) prefork: Update MPM state in children during a graceful restart.
+     Allow the HTTP connection handling loop to terminate early 
+     during a graceful restart.  PR 41743.
+     [Andrew Punch <andrew.punch 247realmedia.com>]
+
   *) mod_ssl: Correctly read full lines in input filter when the line is
      incomplete during first read. PR 50481. [Ruediger Pluem]
 
   *) mod_autoindex: Merge IndexOptions from server to directory context when
      the directory has no mod_autoindex directives. PR 47766. [Eric Covener]
 
+  *) prefork: Update MPM state in children during a graceful restart.
+     Allow the HTTP connection handling loop to terminate early 
+     during a graceful restart.  PR 41743.
+     [Andrew Punch <andrew.punch 247realmedia.com>]
+
   *) mod_cache: Make sure that we never allow a 304 Not Modified response
      that we asked for to leak to the client should the 304 response be
      uncacheable. PR45341 [Graham Leggett]
diff --git a/STATUS b/STATUS
index 17fa73215d7b96d15937390f5c14e30c8efd2162..a4f848343416cfb2dd1f4b7a63661bb46cb5deae 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -90,11 +90,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * prefork: Update MPM state in children; implement fast exit from
-    connection loop via ap_graceful_stop_signalled.  PR 41743.
-    Trunk patch: http://svn.apache.org/viewvc?rev=1068389&view=rev
-    2.2.x patch: https://issues.apache.org/bugzilla/attachment.cgi?id=26623
-    +1: jorton, rpluem, jim
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index f5a72057bc73562ef544ac488cb59989f36adfdb..108f961ae29c5d7d5bd54ee1e0033acc3c3dea7c 100644 (file)
@@ -330,6 +330,7 @@ static void just_die(int sig)
 
 static void stop_listening(int sig)
 {
+    mpm_state = AP_MPMQ_STOPPING;
     ap_close_listeners();
 
     /* For a graceful stop, we want the child to exit when done */
@@ -350,6 +351,7 @@ static void sig_term(int sig)
          */
         return;
     }
+    mpm_state = AP_MPMQ_STOPPING;
     shutdown_pending = 1;
     is_graceful = (sig == AP_SIG_GRACEFUL_STOP);
 }
@@ -363,6 +365,7 @@ static void restart(int sig)
         /* Probably not an error - don't bother reporting it */
         return;
     }
+    mpm_state = AP_MPMQ_STOPPING;
     restart_pending = 1;
     is_graceful = (sig == AP_SIG_GRACEFUL);
 }
@@ -458,8 +461,10 @@ static int num_listensocks = 0;
 
 int ap_graceful_stop_signalled(void)
 {
-    /* not ever called anymore... */
-    return 0;
+    /* Return true if the server is stopping for whatever reason; the
+     * function is used to initiate a fast exit from the connection
+     * processing loop. */
+    return mpm_state == AP_MPMQ_STOPPING;
 }