From c54018b07a9085c0a3aedbc2bd01a85a3b3e20cf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 25 May 2024 06:41:27 +0200 Subject: Merging upstream version 2.4.59. Signed-off-by: Daniel Baumann --- server/mpm/mpmt_os2/mpmt_os2.c | 8 ++++---- server/mpm/mpmt_os2/mpmt_os2_child.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'server/mpm/mpmt_os2') diff --git a/server/mpm/mpmt_os2/mpmt_os2.c b/server/mpm/mpmt_os2/mpmt_os2.c index 22bf5e7..b3adb03 100644 --- a/server/mpm/mpmt_os2/mpmt_os2.c +++ b/server/mpm/mpmt_os2/mpmt_os2.c @@ -26,7 +26,7 @@ * * Each child process consists of a pool of worker threads and a * main thread that accepts connections & passes them to the workers via - * a work queue. The worker thread pool is dynamic, managed by a maintanence + * a work queue. The worker thread pool is dynamic, managed by a maintenance * thread so that the number of idle threads is kept between * min_spare_threads & max_spare_threads. * @@ -79,7 +79,7 @@ int ap_min_spare_threads = 0; int ap_max_spare_threads = 0; /* Keep track of a few interesting statistics */ -int ap_max_daemons_limit = -1; +int ap_max_daemons_limit = 0; /* volatile just in case */ static int volatile shutdown_pending; @@ -344,8 +344,8 @@ static void spawn_child(int slot) "error spawning child, slot %d", slot); } - if (ap_max_daemons_limit < slot) { - ap_max_daemons_limit = slot; + if (slot + 1 > ap_max_daemons_limit) { + ap_max_daemons_limit = slot + 1; } ap_scoreboard_image->parent[slot].pid = proc_rc.codeTerminate; diff --git a/server/mpm/mpmt_os2/mpmt_os2_child.c b/server/mpm/mpmt_os2/mpmt_os2_child.c index bb7e136..f405cd2 100644 --- a/server/mpm/mpmt_os2/mpmt_os2_child.c +++ b/server/mpm/mpmt_os2/mpmt_os2_child.c @@ -200,6 +200,7 @@ void ap_mpm_child_main(apr_pool_t *pconf) int last_poll_idx = 0; apr_pool_create(&pconn, pchild); + apr_pool_tag(pconn, "transaction"); worker_args = apr_palloc(pconn, sizeof(worker_args_t)); worker_args->pconn = pconn; -- cgit v1.2.3