httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1087331 - in /httpd/httpd/trunk: include/http_core.h include/http_main.h modules/generators/mod_status.c server/core.c server/main.c
Date Thu, 31 Mar 2011 15:12:09 GMT
Author: jim
Date: Thu Mar 31 15:12:09 2011
New Revision: 1087331

URL: http://svn.apache.org/viewvc?rev=1087331&view=rev
Log:
Add in a configuration generation... this is independent of
MPM gen, just in case we ever switch MPMs at a graceful ;)

Modified:
    httpd/httpd/trunk/include/http_core.h
    httpd/httpd/trunk/include/http_main.h
    httpd/httpd/trunk/modules/generators/mod_status.c
    httpd/httpd/trunk/server/core.c
    httpd/httpd/trunk/server/main.c

Modified: httpd/httpd/trunk/include/http_core.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/http_core.h?rev=1087331&r1=1087330&r2=1087331&view=diff
==============================================================================
--- httpd/httpd/trunk/include/http_core.h (original)
+++ httpd/httpd/trunk/include/http_core.h Thu Mar 31 15:12:09 2011
@@ -808,6 +808,8 @@ AP_DECLARE(int) ap_state_query(int query
 #define AP_SQ_MAIN_STATE        0
   /** are we going to serve requests or are we just testing/dumping config */
 #define AP_SQ_RUN_MODE          1
+    /** generation of the top-level apache parent */
+#define AP_SQ_CONFIG_GEN        2
 
 /*
  * return values for ap_state_query()

Modified: httpd/httpd/trunk/include/http_main.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/http_main.h?rev=1087331&r1=1087330&r2=1087331&view=diff
==============================================================================
--- httpd/httpd/trunk/include/http_main.h (original)
+++ httpd/httpd/trunk/include/http_main.h Thu Mar 31 15:12:09 2011
@@ -51,6 +51,8 @@ AP_DECLARE_DATA extern apr_pool_t *ap_pg
 AP_DECLARE_DATA extern int ap_main_state;
 /** run mode (normal, config test, config dump, ...) */
 AP_DECLARE_DATA extern int ap_run_mode;
+/** run mode (normal, config test, config dump, ...) */
+AP_DECLARE_DATA extern int ap_config_generation;
 
 /* for -C, -c and -D switches */
 /** An array of all -C directives.  These are processed before the server's

Modified: httpd/httpd/trunk/modules/generators/mod_status.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_status.c?rev=1087331&r1=1087330&r2=1087331&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_status.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_status.c Thu Mar 31 15:12:09 2011
@@ -390,7 +390,9 @@ static int status_handler(request_rec *r
                              ap_scoreboard_image->global->restart_time,
                              DEFAULT_TIME_FORMAT, 0),
                   "</dt>\n", NULL);
-        ap_rprintf(r, "<dt>Parent Server Generation: %d</dt>\n",
+        ap_rprintf(r, "<dt>Parent Server Config. Generation: %d</dt>\n",
+                   ap_state_query(AP_SQ_CONFIG_GEN));
+        ap_rprintf(r, "<dt>Parent Server MPM Generation: %d</dt>\n",
                    (int)mpm_generation);
         ap_rputs("<dt>Server uptime: ", r);
         show_time(r, up_time);

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1087331&r1=1087330&r2=1087331&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Thu Mar 31 15:12:09 2011
@@ -112,6 +112,7 @@ static apr_table_t *server_config_define
 
 AP_DECLARE_DATA int ap_main_state = AP_SQ_MS_INITIAL_STARTUP;
 AP_DECLARE_DATA int ap_run_mode = AP_SQ_RM_UNKNOWN;
+AP_DECLARE_DATA int ap_config_generation = 1;
 
 static void *create_core_dir_config(apr_pool_t *a, char *dir)
 {
@@ -4368,6 +4369,8 @@ AP_DECLARE(int) ap_state_query(int query
         return ap_main_state;
     case AP_SQ_RUN_MODE:
         return ap_run_mode;
+    case AP_SQ_CONFIG_GEN:
+        return ap_config_generation;
     default:
         return AP_SQ_NOT_SUPPORTED;
     }

Modified: httpd/httpd/trunk/server/main.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/main.c?rev=1087331&r1=1087330&r2=1087331&view=diff
==============================================================================
--- httpd/httpd/trunk/server/main.c (original)
+++ httpd/httpd/trunk/server/main.c Thu Mar 31 15:12:09 2011
@@ -686,6 +686,7 @@ int main(int argc, const char * const ar
     apr_pool_destroy(ptemp);
 
     for (;;) {
+        ap_config_generation++;
         ap_main_state = AP_SQ_MS_DESTROY_CONFIG;
         apr_hook_deregister_all();
         apr_pool_clear(pconf);



Mime
View raw message