]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r377291 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Thu, 1 Jun 2006 20:12:51 +0000 (20:12 +0000)
committerRuediger Pluem <rpluem@apache.org>
Thu, 1 Jun 2006 20:12:51 +0000 (20:12 +0000)
Make the worker and event MPMs support GracefulShutdownTimeout just like
the prefork MPM does.

Submitted by: Chris Darroch <chrisd pearsoncmg.com>
Ported to event MPM by: rooneg
Issue number: 38621

* server/mpm/worker/worker.c
  (ap_mpm_run): Make the graceful shutdown log message refer to the right
   signal, and respect the graceful shutdown timeout if there is one.

* server/mpm/experimental/event/event.c
  (ap_mpm_run): Ditto.

* CHANGES: Note change.

Submitted by: chrisd, rooneg
Reviewed by: chrisd, rpluem, trawick
PR: 38621

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

CHANGES
STATUS
server/mpm/experimental/event/event.c
server/mpm/worker/worker.c

diff --git a/CHANGES b/CHANGES
index 35c6cdfb7810cb8031bfb11638b8a55f1f22fda5..ddd17b1ef44b9140edca2f0d466280ba47053d3c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.3
 
+  *) Respect GracefulShutdownTimeout in the worker and event MPMs.
+     [Chris Darroch, Garrett Rooney]
+
   *) mod_mem_cache: Set content type correctly when delivering data from
      cache. PR 39266. [Ruediger Pluem]
 
diff --git a/STATUS b/STATUS
index 8f825f7ff558010c8a8b60d9dbce1e2579dfcf76..5df609630790857d5b8cee608a523b481d66982a 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -76,14 +76,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-    * Worker and event MPMs: Fix for missing code in handling of
-      GracefulShutdownTimeout.  PR 38621.
-        Trunk version of patch:
-          http://svn.apache.org/viewvc?view=rev&revision=377291
-        2.2.x version of patch:
-          http://issues.apache.org/bugzilla/attachment.cgi?id=18356
-      +1: chrisd, rpluem, trawick
-
     * mod_filter: Don't try to insert a filter that doesn't exist
       PR#39672
       Trunk version: http://svn.apache.org/viewvc?view=rev&revision=410079
index 454420c1158f7a2da944de4dd12876daa9110b2e..78ca33c0d328a1232ce717891433e75981b84cb3 100644 (file)
@@ -1977,8 +1977,14 @@ int ap_mpm_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
                              "removed PID file %s (pid=%ld)",
                              pidfile, (long)getpid());
 
-            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0,
-                         ap_server_conf, "caught SIGTERM, shutting down");
+            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
+                         "caught " AP_SIG_GRACEFUL_STOP_STRING
+                         ", shutting down gracefully");
+        }
+
+        if (ap_graceful_shutdown_timeout) {
+            cutoff = apr_time_now() +
+                     apr_time_from_sec(ap_graceful_shutdown_timeout);
         }
 
         /* Don't really exit until each child has finished */
index 3ecbb03be81f37f1c8233a8dbe7882a06e9c15c3..c9509be67bfe2225a56f0f4a0080e739f569cad5 100644 (file)
@@ -1767,8 +1767,14 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
                              "removed PID file %s (pid=%" APR_PID_T_FMT ")",
                              pidfile, getpid());
 
-            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0,
-                         ap_server_conf, "caught SIGTERM, shutting down");
+            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
+                         "caught " AP_SIG_GRACEFUL_STOP_STRING
+                         ", shutting down gracefully");
+        }
+
+        if (ap_graceful_shutdown_timeout) {
+            cutoff = apr_time_now() +
+                     apr_time_from_sec(ap_graceful_shutdown_timeout);
         }
 
         /* Don't really exit until each child has finished */