]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
my_generation is in the shared scoreboard now.
authorBill Stoddard <stoddard@apache.org>
Sat, 27 Apr 2002 21:01:20 +0000 (21:01 +0000)
committerBill Stoddard <stoddard@apache.org>
Sat, 27 Apr 2002 21:01:20 +0000 (21:01 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94822 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/mpm_winnt.c

index 877c7f158d1e41aac6bb748c2dd1ed9316a420e4..c3a6d6ed8757f437e79195557b7933eb24ab8a96 100644 (file)
@@ -1617,7 +1617,6 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
      * null terminated strings.
      */  
     _putenv(apr_psprintf(p,"AP_PARENT_PID=%i", parent_pid));
-    _putenv(apr_psprintf(p,"AP_MY_GENERATION=%i", ap_my_generation));
 
     i = 0;
     iEnvBlockLen = 1;
@@ -1666,7 +1665,6 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
         CloseHandle(hShareError);
     }
     _putenv("AP_PARENT_PID=");
-    _putenv("AP_MY_GENERATION=");
 
     if (!rv) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
@@ -1820,7 +1818,6 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
             ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s,
                          "ResetEvent(shutdown_event)");
         }
-
     }
     else if (cld == RESTART_HANDLE) {
         /* Received a restart event. Prepare the restart_event to be reused 
@@ -1843,7 +1840,6 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
          */
         CloseHandle(event_handles[CHILD_HANDLE]);
         event_handles[CHILD_HANDLE] = NULL;
-        ++ap_my_generation;
     }
     else {
         /* The child process exited prematurely due to a fatal error. */
@@ -1865,9 +1861,11 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
         }
         CloseHandle(event_handles[CHILD_HANDLE]);
         event_handles[CHILD_HANDLE] = NULL;
+    }
+    if (restart_pending) {
         ++ap_my_generation;
+        ap_scoreboard_image->global->running_generation = ap_my_generation;
     }
-
 die_now:
     if (shutdown_pending) 
     {
@@ -2422,8 +2420,7 @@ static void winnt_child_init(apr_pool_t *pchild, struct server_rec *s)
         /* Set up the listeners */
         get_listeners_from_parent(s);
 
-        ap_my_generation = atoi(getenv("AP_MY_GENERATION"));
-
+        ap_my_generation = ap_scoreboard_image->global->running_generation;
         rv = apr_proc_mutex_child_init(&start_mutex, signal_name_prefix, 
                                        s->process->pool);
     }