summaryrefslogtreecommitdiffstats
path: root/server/mpm/mpmt_os2/mpmt_os2.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-25 04:41:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-25 04:41:26 +0000
commit7b31d4f4901cdb89a79f2f7de4a6b8bb637b523b (patch)
treefdeb0b5ff80273f95ce61607fc3613dff0b9a235 /server/mpm/mpmt_os2/mpmt_os2.c
parentAdding upstream version 2.4.38. (diff)
downloadapache2-upstream.tar.xz
apache2-upstream.zip
Adding upstream version 2.4.59.upstream/2.4.59upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'server/mpm/mpmt_os2/mpmt_os2.c')
-rw-r--r--server/mpm/mpmt_os2/mpmt_os2.c8
1 files changed, 4 insertions, 4 deletions
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;