summaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-10-26 16:22:24 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-10-26 16:22:24 +0000
commit39625e5c46060174cb17fbc9e079aabac686ecec (patch)
treee689d342918691c6d4c76eab5503f8c04ab7dec4 /src/core
parentf10b4e07a562f967c5de4d9e65f2a023dd2e7ada (diff)
downloadnginx-39625e5c46060174cb17fbc9e079aabac686ecec.tar.gz
nginx-39625e5c46060174cb17fbc9e079aabac686ecec.tar.bz2
merge r2972, r2994, r3133, r3142, r3143, r3174, r3175, r3176:
various perl fixes: *) fix ngx_http_send_special() for subrequests handled by perl *) allow perl "sub{..." *) restore environ, this fixes segfault on reconfiguration failure when perl module creates new environment *) optimize error handling *) use ngx_conf_set_str_array_slot() for perl_require *) allow several perl_modules
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ngx_cycle.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index fbfc9c676..cd9efbee7 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -255,11 +255,13 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
#endif
if (ngx_conf_param(&conf) != NGX_CONF_OK) {
+ environ = senv;
ngx_destroy_cycle_pools(&conf);
return NULL;
}
if (ngx_conf_parse(&conf, &cycle->conf_file) != NGX_CONF_OK) {
+ environ = senv;
ngx_destroy_cycle_pools(&conf);
return NULL;
}
@@ -280,6 +282,7 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
if (module->init_conf(cycle, cycle->conf_ctx[ngx_modules[i]->index])
== NGX_CONF_ERROR)
{
+ environ = senv;
ngx_destroy_cycle_pools(&conf);
return NULL;
}
@@ -698,8 +701,8 @@ old_shm_zone_done:
if (ngx_process == NGX_PROCESS_MASTER || ngx_is_init_cycle(old_cycle)) {
/*
- * perl_destruct() frees environ if it is not the same as it was at
- * perl_construct() time. So we have saved an previous cycle
+ * perl_destruct() frees environ, if it is not the same as it was at
+ * perl_construct() time, therefore we save the previous cycle
* environment before ngx_conf_parse() where it will be changed.
*/