Commit 5f7360ca authored by Ryan Bloom's avatar Ryan Bloom
Browse files

Setup the server start time correctly. This also gets the server uptime

to be reported correctly.  I have also moved this code into a common
location, so that individual MPMs do not need to worry about setting up
the start time.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87994 13f79535-47bb-0310-9956-ffa450edef68
parent 99256532
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
Changes with Apache 2.0b1

  *) Make the server status page show the correct restart time, and
     thus the proper uptime. [Ryan Bloom]

  *) Move the CGI creation logic from mod_include to mod_cgi(d).  This
     should reduce the amount of duplicate code that is required to
     create CGI processes.
+0 −5
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ static int ap_threads_to_start=0;
static int min_spare_threads=0;
static int max_spare_threads=0;
static int ap_thread_limit=0;
static apr_time_t ap_restart_time=0;
AP_DECLARE_DATA int ap_extended_status = 0;
static int num_listening_sockets = 0; /* set by open_listeners in ap_mpm_run */
static apr_socket_t ** listening_sockets;
@@ -797,10 +796,6 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
		    "SIGHUP received.  Attempting to restart");
    }
    
    if (!is_graceful) {
        ap_restart_time = apr_now();
    }

    /* just before we go, tidy up the locks we've created to prevent a 
     * potential leak of semaphores... */
    apr_destroy_lock(worker_thread_count_mutex);
+0 −4
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ static int ap_daemons_to_start=0;
static int min_spare_threads=0;
static int max_spare_threads=0;
static int ap_daemons_limit=0;
static apr_time_t ap_restart_time=0;
AP_DECLARE_DATA int ap_extended_status = 0;
static int workers_may_exit = 0;
static int requests_this_child;
@@ -809,9 +808,6 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, errno, ap_server_conf,
		    "SIGHUP received.  Attempting to restart");
    }
    if (!is_graceful) {
        ap_restart_time = apr_now();
    }
    delete_port(port_of_death);
    return 0;
}
+0 −3
Original line number Diff line number Diff line
@@ -1148,9 +1148,6 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
		    "SIGHUP received.  Attempting to restart");
    }
    if (!is_graceful) {
        ap_restart_time = apr_now();
    }
    return 0;
}

+0 −4
Original line number Diff line number Diff line
@@ -1280,10 +1280,6 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
		    "SIGHUP received.  Attempting to restart");
    }

    if (!is_graceful) {
	ap_restart_time = apr_now();
    }

    return 0;
}

Loading