diff --git a/httpd-2.4.52/server/mpm/event/event.c b/httpd-2.4.52/server/mpm/event/event.c index c2d53ff..977c89c 100644 --- a/httpd-2.4.52/server/mpm/event/event.c +++ b/httpd-2.4.52/server/mpm/event/event.c @@ -2766,7 +2766,7 @@ static int make_child(server_rec * s, int slot, int bucket) } /* start up a bunch of children */ -static void startup_children(int number_to_start) +static int startup_children(int number_to_start) { int i; @@ -2779,6 +2779,8 @@ static void startup_children(int number_to_start) } --number_to_start; } + + return number_to_start; } static void perform_idle_server_maintenance(int child_bucket) @@ -3090,8 +3092,7 @@ static void server_main_loop(int remaining_children_to_start) * generation of children needed to be reaped... so assume * they're all done, and pick up the slack if any is left. */ - startup_children(remaining_children_to_start); - remaining_children_to_start = 0; + remaining_children_to_start = startup_children(remaining_children_to_start); /* In any event we really shouldn't do the code below because * few of the servers we just started are in the IDLE state * yet, so we'd mistakenly create an extra server. @@ -3158,8 +3159,7 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s) remaining_children_to_start = active_daemons_limit; } if (!retained->mpm->was_graceful) { - startup_children(remaining_children_to_start); - remaining_children_to_start = 0; + remaining_children_to_start = startup_children(remaining_children_to_start); } else { /* give the system some time to recover before kicking into