httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Trawick" <traw...@gmail.com>
Subject [1.3 PATCH] another fix for "Bad pid ... in scoreboard ..." message
Date Wed, 14 Nov 2007 18:05:55 GMT
The last fix had a simple mistake: Good logic was inadvertently
trapped inside "if (ap_extended_status)", so a bunch of "Bad pid"
messages could show up at termination for folks with the default (off)
setting for ExtendedStatus.

Proposed fix:

Index: src/main/http_main.c
===================================================================
--- src/main/http_main.c	(revision 594940)
+++ src/main/http_main.c	(working copy)
@@ -2661,7 +2661,6 @@
 	    if (status == SERVER_DEAD) {
 		ss->my_access_count = 0L;
 		ss->my_bytes_served = 0L;
-                ap_scoreboard_image->parent[child_num].pid = 0;
 	    }
 	    ss->conn_count = (unsigned short) 0;
 	    ss->conn_bytes = (unsigned long) 0;
@@ -2689,7 +2688,10 @@
 	    ss->vhostrec =  r->server;
 	}
     }
-    if (status == SERVER_STARTING && r == NULL) {
+    if (status == SERVER_DEAD) {
+        ap_scoreboard_image->parent[child_num].pid = 0;
+    }
+    else if (status == SERVER_STARTING && r == NULL) {
 	/* clean up the slot's vhostrec pointer (maybe re-used)
 	 * and mark the slot as belonging to a new generation.
 	 */

Mime
View raw message