You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2003/12/04 04:05:42 UTC

cvs commit: httpd-2.0/server main.c

trawick     2003/12/03 19:05:42

  Modified:    .        CHANGES
               server   main.c
  Log:
  Clean up httpd -V output: Instead of displaying the MPM source
  directory, display the MPM name and some MPM properties.
  
  Submitted by: Geoffrey Young <geoff apache.org>
  Reviewed by:  Jeff Trawick
  
  Revision  Changes    Path
  1.1332    +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1331
  retrieving revision 1.1332
  diff -u -r1.1331 -r1.1332
  --- CHANGES	2 Dec 2003 19:08:40 -0000	1.1331
  +++ CHANGES	4 Dec 2003 03:05:42 -0000	1.1332
  @@ -2,6 +2,10 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) Clean up httpd -V output: Instead of displaying the MPM source
  +     directory, display the MPM name and some MPM properties.
  +     [Geoffrey Young <geoff apache.org>]
  +
     *) Fixed cache-removal order in mod_mem_cache.
        [Jean-Jacques Clar, Cliff Woolley]
   
  
  
  
  1.148     +43 -5     httpd-2.0/server/main.c
  
  Index: main.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/main.c,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- main.c	26 Nov 2003 02:09:25 -0000	1.147
  +++ main.c	4 Dec 2003 03:05:42 -0000	1.148
  @@ -85,7 +85,46 @@
    * Most significant main() global data can be found in http_config.c
    */
   
  -/* XXX - We should be able to grab the per-MPM settings here too */
  +static void show_mpm_settings(void)
  +{
  +    int mpm_query_info;
  +    apr_status_t retval;
  +
  +    printf("Server MPM:     %s\n", ap_show_mpm());
  +
  +    retval = ap_mpm_query(AP_MPMQ_IS_THREADED, &mpm_query_info);
  +
  +    if (retval == APR_SUCCESS) {
  +        printf("  threaded:     ");
  +
  +        if (mpm_query_info == AP_MPMQ_DYNAMIC) {
  +            printf("yes (variable thread count)\n");
  +        }
  +        else if (mpm_query_info == AP_MPMQ_STATIC) {
  +            printf("yes (fixed thread count)\n");
  +        }
  +        else {
  +            printf("no\n");
  +        }
  +    }
  +
  +    retval = ap_mpm_query(AP_MPMQ_IS_FORKED, &mpm_query_info);
  +
  +    if (retval == APR_SUCCESS) {
  +        printf("    forked:     ");
  +
  +        if (mpm_query_info == AP_MPMQ_DYNAMIC) {
  +            printf("yes (variable process count)\n");
  +        }
  +        else if (mpm_query_info == AP_MPMQ_STATIC) {
  +            printf("yes (fixed process count)\n");
  +        }
  +        else {
  +            printf("no\n");
  +        }
  +    }
  +}
  +
   static void show_compile_settings(void)
   {
       printf("Server version: %s\n", ap_get_server_version());
  @@ -98,6 +137,9 @@
        * consistent
        */
       printf("Architecture:   %ld-bit\n", 8 * (long)sizeof(void *));
  +
  +    show_mpm_settings();
  +
       printf("Server compiled with....\n");
   #ifdef BIG_SECURITY_HOLE
       printf(" -D BIG_SECURITY_HOLE\n");
  @@ -105,10 +147,6 @@
   
   #ifdef SECURITY_HOLE_PASS_AUTHORIZATION
       printf(" -D SECURITY_HOLE_PASS_AUTHORIZATION\n");
  -#endif
  -
  -#ifdef APACHE_MPM_DIR
  -    printf(" -D APACHE_MPM_DIR=\"%s\"\n", APACHE_MPM_DIR);
   #endif
   
   #ifdef HAVE_SHMGET