properly initialized.
Move ap_restart_time into the scoreboard global area so the child process
on non-forking platforms can have access to it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93502
13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.0.33-dev
+ *) Win32: Fix bug in mod_status with displaying "Restart Time"
+ [Bill Stoddard]
*) Fix IPv6 name-based virtual hosts. [Jeff Trawick]
ap_scoreboard_e sb_type;
ap_generation_t running_generation; /* the generation of children which
* should still be serving requests. */
+ apr_time_t restart_time;
} global_score;
/* stuff which the parent generally writes and the children rarely read */
AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image;
AP_DECLARE_DATA extern const char *ap_scoreboard_fname;
AP_DECLARE_DATA extern int ap_extended_status;
-AP_DECLARE_DATA extern apr_time_t ap_restart_time;
AP_DECLARE_DATA extern ap_generation_t volatile ap_my_generation;
}
/* up_time in seconds */
- up_time = (apr_uint32_t) ((nowtime - ap_restart_time)/APR_USEC_PER_SEC);
+ up_time = (apr_uint32_t) ((nowtime - ap_scoreboard_image->global->restart_time)/APR_USEC_PER_SEC);
if (!short_report) {
ap_rputs(DOCTYPE_HTML_3_2
ap_rvputs(r, "<dt>Current Time: ",
ap_ht_time(r->pool, nowtime, DEFAULT_TIME_FORMAT, 0), "</dt>\n", NULL);
ap_rvputs(r, "<dt>Restart Time: ",
- ap_ht_time(r->pool, ap_restart_time, DEFAULT_TIME_FORMAT, 0),
+ ap_ht_time(r->pool, ap_scoreboard_image->global->restart_time, DEFAULT_TIME_FORMAT, 0),
"</dt>\n", NULL);
ap_rprintf(r, "<dt>Parent Server Generation: %d</dt>\n", (int) ap_my_generation);
ap_rputs("<dt>Server uptime: ", r);
AP_DECLARE_DATA scoreboard *ap_scoreboard_image = NULL;
AP_DECLARE_DATA const char *ap_scoreboard_fname = NULL;
AP_DECLARE_DATA int ap_extended_status = 0;
-AP_DECLARE_DATA apr_time_t ap_restart_time = 0;
#if APR_HAS_SHARED_MEMORY
}
ap_scoreboard_image->global->sb_type = sb_type;
ap_scoreboard_image->global->running_generation = running_gen;
- ap_restart_time = apr_time_now();
+ ap_scoreboard_image->global->restart_time = apr_time_now();
apr_pool_cleanup_register(p, NULL, ap_cleanup_scoreboard, apr_pool_cleanup_null);
return OK;
}