]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
A newly created child now has a start_time of 0, to prevent
authorMartin Kraemer <martin@apache.org>
Fri, 25 Apr 2003 13:50:23 +0000 (13:50 +0000)
committerMartin Kraemer <martin@apache.org>
Fri, 25 Apr 2003 13:50:23 +0000 (13:50 +0000)
mod_status from displaying a bogus value for the "time to
process most recent request" column for freshly-started children
in a previously-used scoreboard slot.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@99600 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/main/http_main.c

index 3c6816a972e673b7cb8ec9ae2fe64f6e006d52ae..da3de85d8f90a95a01f30e3622d8d3ab8988a124 100644 (file)
@@ -1,5 +1,10 @@
 Changes with Apache 1.3.28
 
+  *) A newly created child now has a start_time of 0, to prevent
+     mod_status from displaying a bogus value for the "time to
+     process most recent request" column for freshly-started children
+     in a previously-used scoreboard slot. [Martin Kraemer]
+
   *) When using Redirect in directory context, append requested query
      string if there's no one supplied by configuration. PR 10961.
      [AndrĂ© Malo]
index b8ea01261541a18fd90f628420304001c3e24b47..586f68ed7036583c9c054ea059ad00fa145e6adf 100644 (file)
@@ -2576,6 +2576,11 @@ API_EXPORT(int) ap_update_child_status(int child_num, int status, request_rec *r
            ss->conn_count = (unsigned short) 0;
            ss->conn_bytes = (unsigned long) 0;
        }
+        else if (status == SERVER_STARTING) {
+            /* clean out the start_time so that mod_status will print Req=0 */
+            /* Use memset to be independent from the type (struct timeval vs. clock_t) */
+            memset (&ss->start_time, '\0', sizeof ss->start_time);
+        }
        if (r) {
            conn_rec *c = r->connection;
            ap_cpystrn(ss->client, ap_get_remote_host(c, r->per_dir_config,