]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r613260 from trunk:
authorJim Jagielski <jim@apache.org>
Sat, 31 May 2008 11:58:46 +0000 (11:58 +0000)
committerJim Jagielski <jim@apache.org>
Sat, 31 May 2008 11:58:46 +0000 (11:58 +0000)
* server/mpm/prefork/prefork.c (child_main): If apr_pollset_poll()
  fails with EINTR and die_now has been set (indicating a graceful
  stop/restart), terminate the child quickly rather than re-entering
  poll().

Submitted by: jorton
Reviewed by: jim

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

STATUS
server/mpm/prefork/prefork.c

diff --git a/STATUS b/STATUS
index b751e4afbb9f8fa2dad1a672f1233c8e710c6295..d18cd95216bf75bcf70471426de02243815af2a7 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -90,22 +90,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
- * prefork: prefork's apr_pollset_poll() loop-on-EINTR loop was not checking
-  die_now; the child holding the mutex will not die immediately if poll
-  fails with EINTR, and will hence appear to "hang" until a new connection
-  is recevied.
-   Trunk version of patch:
-         http://svn.apache.org/viewvc?view=rev&revision=613260
-   Backport version for 2.2.x of patch:
-         Trunk version of patch works
-    +1: jim, jorton, rpluem
-
- * prefork: Unlock mutex before terminating.
-   Trunk version of patch:
-         http://svn.apache.org/viewvc?view=rev&revision=613252
-   Backport version for 2.2.x of patch:
-         Trunk version of patch works
-    +1: jim, jorton, rpluem
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 404686d972faa6d9e59dc01e707e76befd064cab..3849c222485d7ef65d83efa0dd787f58ef2f5af2 100644 (file)
@@ -580,6 +580,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