]> granicus.if.org Git - apache/commitdiff
clean up the scoreboard properly after threaded processes die gracefully.
authorGreg Ames <gregames@apache.org>
Tue, 7 Aug 2001 22:28:51 +0000 (22:28 +0000)
committerGreg Ames <gregames@apache.org>
Tue, 7 Aug 2001 22:28:51 +0000 (22:28 +0000)
find_child_by_pid() failed to do its job, because ap_max_daemons_used was
too low.  There was some recent breakage in threaded that contributes to
the problem.

However, find_child_by_pid() should not be using the current number of
daemons.  It could have been recently reduced, which makes it fail to
find the exiting process.

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

server/mpm/threaded/threaded.c
server/scoreboard.c

index 68d7c63bbbc41cbf06e88e7997e7d1c0a32b5b58..f0b8992673c812bfa93b3d12f4f652b965a55fd3 100644 (file)
@@ -1047,9 +1047,11 @@ static void perform_idle_server_maintenance(void)
             }
            ++free_length;
        }
+        if (!all_dead_threads) {
+            last_non_dead = i; 
+        }
         /* XXX if (!ps->quiescing)     is probably more reliable  GLA */
        if (!any_dying_threads) {
-            last_non_dead = i;
             ++total_non_dead;
         }
     }
index a7b03993469fd875e77b486c0f6dca7fe8fc41c0..22d9d910819e6ccc5b41cfca631395ed49051c82 100644 (file)
@@ -266,7 +266,7 @@ AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid)
     int i;
     int max_daemons_limit;
 
-    ap_mpm_query(AP_MPMQ_MAX_DAEMON_USED, &max_daemons_limit);
+    ap_mpm_query(AP_MPMQ_MAX_DAEMONS, &max_daemons_limit);
 
     for (i = 0; i < max_daemons_limit; ++i)
        if (ap_scoreboard_image->parent[i].pid == pid->pid)