stas 2003/10/22 18:05:49
Modified: src/modules/perl mod_perl.c Log: move the init of the base perl into modperl_startup Revision Changes Path 1.194 +19 -7 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.193 retrieving revision 1.194 diff -u -u -r1.193 -r1.194 --- mod_perl.c 19 Oct 2003 20:28:37 -0000 1.193 +++ mod_perl.c 23 Oct 2003 01:05:49 -0000 1.194 @@ -212,6 +212,25 @@ modperl_cleanup_data_t *cdata; #endif + if (MP_init_status != 2) { + server_rec *base_server = modperl_global_get_server_rec(); + PerlInterpreter *base_perl; + modperl_config_srv_t *base_scfg; + + MP_init_status = 2; /* calls itself, so set the flag early */ + base_perl = modperl_startup(base_server, p); + base_scfg = modperl_config_srv_get(base_server); + +#ifdef USE_ITHREADS + /* a parent perl was allocated, mark it to be destroyed */ + MpInterpBASE_On(base_scfg->mip->parent); +#endif + + if (base_server == s ) { + return base_perl; + } + } + #ifdef MP_USE_GTOP MP_TRACE_m_do( modperl_gtop_do_proc_mem_before(MP_FUNC, "perl_parse"); @@ -422,13 +441,6 @@ base_perl = modperl_startup(base_server, p); - MP_init_status = 2; /* only now mp has really started */ - -#ifdef USE_ITHREADS - /* a parent perl was allocated, mark it to be destroyed */ - MpInterpBASE_On(base_scfg->mip->parent); -#endif - for (s=base_server->next; s; s=s->next) { if (modperl_init_vhost(s, p, base_server) != OK) { exit(1); /*XXX*/