]> granicus.if.org Git - apache/commitdiff
* server/mpm/prefork/prefork.c (child_main): Stop processing new
authorJoe Orton <jorton@apache.org>
Fri, 29 Jun 2007 20:54:01 +0000 (20:54 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 29 Jun 2007 20:54:01 +0000 (20:54 +0000)
connections if shutdown_pending is set, i.e. when SIGTERM is received
in single-proecss mode.

Submitted by: Garrett Rooney <rooneg apache.org>
PR: 38848

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

server/mpm/prefork/prefork.c

index 98b07e6e768b14482d48a0151d23bcef752f6991..f362e9637999decc207beb456e6db6e40de17a89 100644 (file)
@@ -513,7 +513,10 @@ static void child_main(int child_num_arg)
 
     bucket_alloc = apr_bucket_alloc_create(pchild);
 
-    while (!die_now) {
+    /* die_now is set when AP_SIG_GRACEFUL is received in the child;
+     * shutdown_pending is set when SIGTERM is received when running
+     * in single process mode.  */
+    while (!die_now && !shutdown_pending) {
         conn_rec *current_conn;
         void *csd;