From 316f5fa11d32ca223d3895d406d8f64232c8c177 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Fri, 12 Apr 2002 19:58:52 +0000 Subject: [PATCH] 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 --- CHANGES | 4 ++++ server/mpm/worker/worker.c | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index b724410e0d..a6d4c86a9d 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 ee49f165fe..8d77ad68d4 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; -- 2.50.1