]> granicus.if.org Git - apache/commitdiff
ap_create_scoreboard() now initializes the scoreboard if it already exists,
authorJeff Trawick <trawick@apache.org>
Wed, 20 Mar 2002 20:30:46 +0000 (20:30 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 20 Mar 2002 20:30:46 +0000 (20:30 +0000)
so MPMs shouldn't call it for a graceful restart

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

server/scoreboard.c

index 8e866f6975c6339b47a4a75d91dc38f54015f81d..0e8b692472f5c677761ba394a540fb39b18ad71c 100644 (file)
@@ -289,12 +289,20 @@ apr_status_t ap_cleanup_scoreboard(void *d)
 int ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e sb_type)
 {
     int running_gen = 0;
+    int i;
 #if APR_HAS_SHARED_MEMORY
     apr_status_t rv;
 #endif
 
     if (ap_scoreboard_image) {
         running_gen = ap_scoreboard_image->global->running_generation;
+        ap_scoreboard_image->global->restart_time = apr_time_now();
+        memset(ap_scoreboard_image->parent, 0, 
+               sizeof(process_score) * server_limit);
+        for (i = 0; i < server_limit; i++) {
+            memset(ap_scoreboard_image->servers[i], 0,
+                   sizeof(worker_score) * thread_limit);
+        }
         return OK;
     }