]> granicus.if.org Git - apache/commitdiff
Some fixing for startup of children after a graceful restart, so that the
authorManoj Kasichainula <manoj@apache.org>
Wed, 21 Jul 1999 20:44:41 +0000 (20:44 +0000)
committerManoj Kasichainula <manoj@apache.org>
Wed, 21 Jul 1999 20:44:41 +0000 (20:44 +0000)
processes can start faster.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83479 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/dexter/dexter.c

index db012f48deea1802792e1d3b89a980dd540f404c..de5a24a10188db806d2a7cd382c39f72226da483 100644 (file)
@@ -1113,7 +1113,7 @@ static int make_child(server_rec *s, int slot, time_t now) /* ZZZ */
 }
 
 /* start up a bunch of children */
-static void startup_children(int number_to_start)
+static int startup_children(int number_to_start)
 {
     int i;
 
@@ -1126,6 +1126,7 @@ static void startup_children(int number_to_start)
        }
        --number_to_start;
     }
+    return number_to_start;
 }
 
 
@@ -1238,8 +1239,8 @@ 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.
@@ -1298,8 +1299,8 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s)
      */
     remaining_children_to_start = ap_num_daemons;
     if (!is_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