Mercurial > hg > nginx
diff src/core/ngx_cycle.c @ 1165:efb7d84db340
fix segfault when
*) perl was built without multiplicity
*) when configuration was invalid
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 18 Apr 2007 11:28:11 +0000 |
parents | 01884449985f |
children | e584e946e198 |
line wrap: on
line diff
--- a/src/core/ngx_cycle.c Wed Apr 18 11:09:38 2007 +0000 +++ b/src/core/ngx_cycle.c Wed Apr 18 11:28:11 2007 +0000 @@ -54,11 +54,8 @@ ngx_list_part_t *part, *opart; ngx_open_file_t *file; ngx_listening_t *ls, *nls; - ngx_core_conf_t *ccf; + ngx_core_conf_t *ccf, *old_ccf; ngx_core_module_t *module; -#if !(WIN32) - ngx_core_conf_t *old_ccf; -#endif log = old_cycle->log; @@ -747,6 +744,14 @@ failed: + if (!ngx_is_init_cycle(old_cycle)) { + old_ccf = (ngx_core_conf_t *) ngx_get_conf(old_cycle->conf_ctx, + ngx_core_module); + if (old_ccf->environment) { + environ = old_ccf->environment; + } + } + /* rollback the new cycle configuration */ part = &cycle->open_files.part;