Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 1554 invoked by uid 500); 10 Jul 2001 22:51:06 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 1479 invoked by uid 500); 10 Jul 2001 22:51:01 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 10 Jul 2001 22:50:59 -0000 Message-ID: <20010710225059.1453.qmail@apache.org> From: gregames@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/generators mod_status.c gregames 01/07/10 15:50:58 Modified: modules/generators mod_status.c Log: fix pid numbers in mod_status output when using a threaded mpm. pid_buffer was being indexed by worker slot during initialization, then by process slot when generating output. This saves a little storage and a few cycles, too. Revision Changes Path 1.40 +2 -2 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.39 retrieving revision 1.40 diff -u -d -b -u -r1.39 -r1.40 --- mod_status.c 2001/05/31 18:10:04 1.39 +++ mod_status.c 2001/07/10 22:50:54 1.40 @@ -254,7 +254,7 @@ worker_score ws_record; process_score ps_record; char stat_buffer[HARD_SERVER_LIMIT * HARD_THREAD_LIMIT]; - pid_t pid_buffer[HARD_SERVER_LIMIT * HARD_THREAD_LIMIT]; + pid_t pid_buffer[HARD_SERVER_LIMIT]; clock_t tu, ts, tcu, tcs; server_rec *vhost; @@ -321,7 +321,6 @@ ps_record = ap_scoreboard_image->parent[i]; res = ws_record.status; stat_buffer[indx] = status_flags[res]; - pid_buffer[indx] = ps_record.pid; if (res == SERVER_READY) ready++; else if (res != SERVER_DEAD && res != SERVER_IDLE_KILL) @@ -345,6 +344,7 @@ } } } + pid_buffer[i] = ps_record.pid; } /* up_time in seconds */