gregames 01/07/11 20:20:53
Modified: include scoreboard.h
modules/generators mod_status.c
server connection.c scoreboard.c
Log:
scratch an old itch - give lingering close its own state in the scoreboard.
clean up SERVER_ACCEPTING and SERVER_QUEUEING (never set) while I'm at it.
Revision Changes Path
1.24 +4 -5 httpd-2.0/include/scoreboard.h
Index: scoreboard.h
===================================================================
RCS file: /home/cvs/httpd-2.0/include/scoreboard.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -b -u -r1.23 -r1.24
--- scoreboard.h 2001/07/10 18:59:59 1.23
+++ scoreboard.h 2001/07/12 03:20:39 1.24
@@ -91,11 +91,10 @@
#define SERVER_BUSY_KEEPALIVE 5 /* Waiting for more requests via keepalive */
#define SERVER_BUSY_LOG 6 /* Logging the request */
#define SERVER_BUSY_DNS 7 /* Looking up a hostname */
-#define SERVER_GRACEFUL 8 /* server is gracefully finishing request */
-#define SERVER_ACCEPTING 9 /* thread is accepting connections */
-#define SERVER_QUEUEING 10 /* thread is putting connection on the queue */
-#define SERVER_IDLE_KILL 11 /* Server is cleaning up idle children. */
-#define SERVER_NUM_STATUS 12 /* number of status settings */
+#define SERVER_CLOSING 8 /* Closing the connection */
+#define SERVER_GRACEFUL 9 /* server is gracefully finishing request */
+#define SERVER_IDLE_KILL 10 /* Server is cleaning up idle children. */
+#define SERVER_NUM_STATUS 11 /* number of status settings */
/* Type used for generation indicies. Startup and every restart cause a
* new generation of children to be spawned. Children within the same
1.41 +9 -1 httpd-2.0/modules/generators/mod_status.c
Index: mod_status.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_status.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -b -u -r1.40 -r1.41
--- mod_status.c 2001/07/10 22:50:54 1.40
+++ mod_status.c 2001/07/12 03:20:45 1.41
@@ -464,8 +464,9 @@
ap_rputs("\"<B><code>W</code></B>\" Sending Reply, \n", r);
ap_rputs("\"<B><code>K</code></B>\" Keepalive (read), \n", r);
ap_rputs("\"<B><code>D</code></B>\" DNS Lookup,<BR>\n",
r);
+ ap_rputs("\"<B><code>C</code></B>\" Closing connection, \n", r);
ap_rputs("\"<B><code>L</code></B>\" Logging, \n", r);
- ap_rputs("\"<B><code>G</code></B>\" Gracefully finishing, \n",
r);
+ ap_rputs("\"<B><code>G</code></B>\" Gracefully finishing,<BR>
\n", r);
ap_rputs("\"<B><code>I</code></B>\" Idle cleanup of worker,
\n", r);
ap_rputs("\"<B><code>.</code></B>\" Open slot with no current
process<P>\n", r);
ap_rputs("<P>\n", r);
@@ -585,6 +586,9 @@
case SERVER_BUSY_DNS:
ap_rputs("<b>DNS lookup</b>", r);
break;
+ case SERVER_CLOSING:
+ ap_rputs("<b>Closing</b>", r);
+ break;
case SERVER_DEAD:
ap_rputs("Dead", r);
break;
@@ -659,6 +663,9 @@
case SERVER_BUSY_DNS:
ap_rputs("<td><b>D</b>", r);
break;
+ case SERVER_CLOSING:
+ ap_rputs("<td><b>C</b>", r);
+ break;
case SERVER_DEAD:
ap_rputs("<td>.", r);
break;
@@ -764,6 +771,7 @@
status_flags[SERVER_BUSY_KEEPALIVE] = 'K';
status_flags[SERVER_BUSY_LOG] = 'L';
status_flags[SERVER_BUSY_DNS] = 'D';
+ status_flags[SERVER_CLOSING] = 'C';
status_flags[SERVER_GRACEFUL] = 'G';
status_flags[SERVER_IDLE_KILL] = 'I';
}
1.83 +2 -0 httpd-2.0/server/connection.c
Index: connection.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/connection.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -b -u -r1.82 -r1.83
--- connection.c 2001/05/11 04:35:41 1.82
+++ connection.c 2001/07/12 03:20:48 1.83
@@ -157,6 +157,8 @@
apr_int32_t timeout;
apr_int32_t total_linger_time = 0;
+ ap_update_child_status(AP_CHILD_THREAD_FROM_ID(c->id), SERVER_CLOSING, NULL);
+
#ifdef NO_LINGCLOSE
ap_flush_conn(c); /* just close it */
apr_socket_close(c->client_socket);
1.26 +1 -1 httpd-2.0/server/scoreboard.c
Index: scoreboard.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -b -u -r1.25 -r1.26
--- scoreboard.c 2001/07/10 19:00:03 1.25
+++ scoreboard.c 2001/07/12 03:20:50 1.26
@@ -279,7 +279,7 @@
ps = &ap_scoreboard_image->parent[child_num];
- if ((status == SERVER_READY || status == SERVER_ACCEPTING)
+ if (status == SERVER_READY
&& old_status == SERVER_STARTING) {
ws->thread_num = child_num * HARD_SERVER_LIMIT + thread_num;
ps->generation = ap_my_generation;
|