summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2024-03-11 21:35:27 +0100
committerEric Covener <covener@apache.org>2024-03-11 21:35:27 +0100
commit179b1ac6a4adb14ab0f52fbc7431534db9e3e8c8 (patch)
tree4089140f00739def3456bb1474399b889a39fd97 /server
parentoptarg is from unistd.h, use opt_arg from apr_getopt(). (diff)
downloadapache2-179b1ac6a4adb14ab0f52fbc7431534db9e3e8c8.tar.xz
apache2-179b1ac6a4adb14ab0f52fbc7431534db9e3e8c8.zip
event: avoid possible hang in clean_child_exit
If the pthread_create failure isn't on the first worker thread, another one is likely to hold the queue mutex already. The cleanup of pchild will try to cleanup the queue and block on destroying the condition. ST_UNGRACEFUL as we have no listener thread yet. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916241 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/mpm/event/event.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c
index 29d18a943a..e4af652ba3 100644
--- a/server/mpm/event/event.c
+++ b/server/mpm/event/event.c
@@ -2749,6 +2749,7 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)
APLOGNO(03104)
"ap_thread_create: unable to create worker thread");
/* let the parent decide how bad this really is */
+ signal_threads(ST_UNGRACEFUL);
clean_child_exit(APEXIT_CHILDSICK);
}
threads_created++;