From d73f9b6e0976a3dad8a6fd1e5c3737c4a150ee50 Mon Sep 17 00:00:00 2001 From: Martin Kraemer Date: Fri, 25 Apr 2003 13:50:23 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@99600 13f79535-47bb-0310-9956-ffa450edef68 --- src/CHANGES | 5 +++++ src/main/http_main.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/CHANGES b/src/CHANGES index 3c6816a972e..da3de85d8f9 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -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] diff --git a/src/main/http_main.c b/src/main/http_main.c index b8ea0126154..586f68ed703 100644 --- a/src/main/http_main.c +++ b/src/main/http_main.c @@ -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, -- 2.47.2