]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make the worker and event MPMs support GracefulShutdownTimeout just like
authorGarrett Rooney <rooneg@apache.org>
Mon, 13 Feb 2006 02:25:53 +0000 (02:25 +0000)
committerGarrett Rooney <rooneg@apache.org>
Mon, 13 Feb 2006 02:25:53 +0000 (02:25 +0000)
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.

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

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

diff --git a/CHANGES b/CHANGES
index 1052c63163d0ec284d2fd0976b1cf7415cb0495d..86780ab1c33700e3f9570531336b1d24c42415a6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) Respect GracefulShutdownTimeout in the worker and event MPMs.
+     [Chris Darroch <chrisd pearsoncmg.com>, Garrett Rooney]
+
   *) mod_proxy_balancer: Do not overwrite the status of initialized workers and
      respect the configured status of uninitilized workers when creating a new
      child process. [Ruediger Pluem]
index 38f187d1f8fb8ce35272ea860cc6f74c24a06fca..e0c9aa43ea71d48c46f47033e7b94641914d6593 100644 (file)
@@ -2037,8 +2037,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 87b910fd10d681facc25208b9600e9866363cb79..faf9747e2e80fe39846942b6797cae27ab03e169 100644 (file)
@@ -1768,8 +1768,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 */