]> git.kaiwu.me - nginx.git/commitdiff
fix building on threaded or multiplicity interpreter perl,
authorIgor Sysoev <igor@sysoev.ru>
Sat, 16 Jun 2007 09:22:37 +0000 (09:22 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sat, 16 Jun 2007 09:22:37 +0000 (09:22 +0000)
the bug was introduced by previous commit

src/http/modules/perl/ngx_http_perl_module.c

index 6e4c42787e58b08260c79e17e4cec8168235f3e3..248f5782390b3cb4ce67078d07b5177a3a5bd181 100644 (file)
@@ -1008,10 +1008,21 @@ ngx_http_perl_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 static ngx_int_t
 ngx_http_perl_init_worker(ngx_cycle_t *cycle)
 {
+    ngx_http_perl_main_conf_t  *pmcf;
+
+    pmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_perl_module);
+
+    {
+
+    dTHXa(pmcf->perl);
+    PERL_SET_CONTEXT(pmcf->perl);
+
     /* set worker's $$ */
 
     sv_setiv(GvSV(gv_fetchpv("$", TRUE, SVt_PV)), (I32) ngx_pid);
 
+    }
+
     return NGX_OK;
 }