httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r377291 - in /httpd/httpd/trunk: CHANGES server/mpm/experimental/event/event.c server/mpm/worker/worker.c
Date Mon, 13 Feb 2006 02:25:55 GMT
Author: rooneg
Date: Sun Feb 12 18:25:53 2006
New Revision: 377291

URL: http://svn.apache.org/viewcvs?rev=377291&view=rev
Log:
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.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/server/mpm/experimental/event/event.c
    httpd/httpd/trunk/server/mpm/worker/worker.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/CHANGES?rev=377291&r1=377290&r2=377291&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun Feb 12 18:25:53 2006
@@ -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]

Modified: httpd/httpd/trunk/server/mpm/experimental/event/event.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/mpm/experimental/event/event.c?rev=377291&r1=377290&r2=377291&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/experimental/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/experimental/event/event.c Sun Feb 12 18:25:53 2006
@@ -2037,8 +2037,14 @@
                              "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 */

Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=377291&r1=377290&r2=377291&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Sun Feb 12 18:25:53 2006
@@ -1768,8 +1768,14 @@
                              "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 */



Mime
View raw message