You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by gr...@apache.org on 2001/07/11 00:50:59 UTC

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 */