--- worker.c.orig 2006-04-11 15:51:43.893770000 -0400 +++ worker.c 2006-04-11 15:56:06.820437000 -0400 @@ -1001,6 +1001,8 @@ if (!listener_started && threads_created) { create_listener_thread(ts); listener_started = 1; + + ap_scoreboard_image->parent[child_num_arg].status = SERVER_READY; } if (start_thread_may_exit || threads_created == ap_threads_per_child) { break; @@ -1279,6 +1281,7 @@ if (one_process) { set_signals(); ap_scoreboard_image->parent[slot].pid = getpid(); + ap_scoreboard_image->parent[slot].status = SERVER_STARTING; child_main(slot); } @@ -1336,6 +1339,7 @@ } ap_scoreboard_image->parent[slot].quiescing = 0; ap_scoreboard_image->parent[slot].pid = pid; + ap_scoreboard_image->parent[slot].status = SERVER_STARTING; return 0; } @@ -1399,6 +1403,10 @@ if (i >= ap_max_daemons_limit && totally_free_length == idle_spawn_rate) break; ps = &ap_scoreboard_image->parent[i]; + if (ps->pid != 0 && ps->status == SERVER_STARTING) { + idle_thread_count += ap_threads_per_child; + continue; + } for (j = 0; j < ap_threads_per_child; j++) { ws = &ap_scoreboard_image->servers[i][j]; status = ws->status; @@ -1567,6 +1575,7 @@ ap_scoreboard_image->parent[child_slot].pid = 0; ap_scoreboard_image->parent[child_slot].quiescing = 0; + ap_scoreboard_image->parent[child_slot].status = 0; if (processed_status == APEXIT_CHILDSICK) { /* resource shortage, minimize the fork rate */ idle_spawn_rate = 1;