]> granicus.if.org Git - apache/commitdiff
* server/mpm/prefork/prefork.c (child_main): If apr_pollset_poll()
authorJoe Orton <jorton@apache.org>
Fri, 18 Jan 2008 20:31:28 +0000 (20:31 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 18 Jan 2008 20:31:28 +0000 (20:31 +0000)
  fails with EINTR and die_now has been set (indicating a graceful
  stop/restart), terminate the child quickly rather than re-entering
  poll().

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

server/mpm/prefork/prefork.c

index ad7b6162de7376a450e32af9677a60c3c3cf5935..1f7ca1e5430d89547f2d963a2ebc8ee98fd5cdf6 100644 (file)
@@ -557,6 +557,12 @@ static void child_main(int child_num_arg)
                         if (one_process && shutdown_pending) {
                             return;
                         }
+                        else if (die_now) {
+                            /* In graceful stop/restart; drop the mutex
+                             * and terminate the child. */
+                            SAFE_ACCEPT(accept_mutex_off());
+                            clean_child_exit(0);
+                        }
                         continue;
                     }
                     /* Single Unix documents select as returning errnos