diff options
author | Vladimir Homutov <vl@nginx.com> | 2015-05-14 18:54:27 +0300 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2015-05-14 18:54:27 +0300 |
commit | 4e83d3f7b5355b36c2d28cd77f4cfefe4521f3ee (patch) | |
tree | 12cd90b9d31e778033f96b30157e1f24764fdb91 /src/core/ngx_cycle.c | |
parent | 42c32b733b95e5e9ce9a627cdc19096c1c6f8e63 (diff) | |
download | nginx-4e83d3f7b5355b36c2d28cd77f4cfefe4521f3ee.tar.gz nginx-4e83d3f7b5355b36c2d28cd77f4cfefe4521f3ee.zip |
Core: store and dump processed configuration.
If the -T option is passed, additionally to configuration test, configuration
files are output to stdout.
In the debug mode, configuration files are kept in memory and can be accessed
using a debugger.
Diffstat (limited to 'src/core/ngx_cycle.c')
-rw-r--r-- | src/core/ngx_cycle.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c index b358f3dbe..ad4bf9254 100644 --- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c @@ -24,6 +24,7 @@ static ngx_pool_t *ngx_temp_pool; static ngx_event_t ngx_cleaner_event; ngx_uint_t ngx_test_config; +ngx_uint_t ngx_dump_config; ngx_uint_t ngx_quiet_mode; @@ -124,6 +125,13 @@ ngx_init_cycle(ngx_cycle_t *old_cycle) cycle->paths.pool = pool; + if (ngx_array_init(&cycle->config_dump, pool, 1, sizeof(ngx_conf_dump_t)) + != NGX_OK) + { + ngx_destroy_pool(pool); + return NULL; + } + if (old_cycle->open_files.part.nelts) { n = old_cycle->open_files.part.nelts; for (part = old_cycle->open_files.part.next; part; part = part->next) { |