]> granicus.if.org Git - apache/commitdiff
worker MPM: Fix a situation where a child exited without releasing
authorJeff Trawick <trawick@apache.org>
Fri, 12 Apr 2002 19:58:52 +0000 (19:58 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 12 Apr 2002 19:58:52 +0000 (19:58 +0000)
the accept mutex.  Depending on the OS and mutex mechanism this
could result in a hang.

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

CHANGES
server/mpm/worker/worker.c

diff --git a/CHANGES b/CHANGES
index b724410e0d636ed2f5a253d79e4e6fc2378a059e..a6d4c86a9d571d17c4bd4de1e23375154e9c28cc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 Changes with Apache 2.0.36
 
+  *) worker MPM: Fix a situation where a child exited without releasing
+     the accept mutex.  Depending on the OS and mutex mechanism this 
+     could result in a hang.  [Jeff Trawick]
+
   *) Update the instructions for how to get started with mod_example.
      [Stas Bekman]
   
index ee49f165fe329b9a58de5af51b0be925b687064c..8d77ad68d46e3d9da41305a8c9365f6e1427c5c7 100644 (file)
@@ -766,13 +766,9 @@ static void *listener_thread(apr_thread_t *thd, void * dummy)
             }
             apr_pool_tag(ptrans, "transaction");
             rv = lr->accept_func(&csd, lr, ptrans);
+            /* later we trash rv and rely on csd to indicate success/failure */
+            AP_DEBUG_ASSERT(rv == APR_SUCCESS || !csd);
 
-            /* If we were interrupted for whatever reason, just start
-             * the main loop over again.
-             */
-            if (APR_STATUS_IS_EINTR(rv)) {
-                continue;
-            }
             if (rv == APR_EGENERAL) {
                 /* E[NM]FILE, ENOMEM, etc */
                 resource_shortage = 1;