rbb 99/02/14 19:12:02
Modified: pthreads/src/main http_main.c Log: This change should solve the problem of spawning new child server's at the first opportunity. I have tested it as much as I can tonight, but I will try to break it again tomorrow morning when I have more computers at my disposal. Revision Changes Path 1.20 +7 -5 apache-apr/pthreads/src/main/http_main.c Index: http_main.c =================================================================== RCS file: /home/cvs/apache-apr/pthreads/src/main/http_main.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- http_main.c 1999/02/12 20:36:59 1.19 +++ http_main.c 1999/02/15 03:12:01 1.20 @@ -2490,20 +2490,22 @@ } } } - if (idle_thread_count <= ap_idle_thread_threshold) { + if (idle_thread_count > ap_idle_thread_threshold) { idle_count++; to_kill = i; } - ++total_non_dead; - last_non_dead = i; + if (status != SERVER_DEAD) { + ++total_non_dead; + last_non_dead = i; + } } max_daemons_limit = last_non_dead + 1; if (idle_count > ap_daemons_max_free) { - /* kill off one child... we use SIGHUP because that'll cause it to + /* kill off one child... we use SIGWINCH because that'll cause it to * shut down gracefully, in case it happened to pick up a request * while we were counting */ - kill(ap_scoreboard_image->parent[to_kill].pid, SIGHUP); + kill(ap_scoreboard_image->parent[to_kill].pid, SIGWINCH); idle_spawn_rate = 1; } else if (idle_count < ap_daemons_min_free) {