From: Jeff Trawick Date: Fri, 12 Apr 2002 19:58:52 +0000 (+0000) Subject: worker MPM: Fix a situation where a child exited without releasing X-Git-Tag: 2.0.36~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=162a4d313de4d54754227bc18f8ba9c817a2a9df;p=thirdparty%2Fapache%2Fhttpd.git 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94625 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index b724410e0d6..a6d4c86a9d5 100644 --- 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] diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index ee49f165fe3..8d77ad68d46 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -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;