Author: stas
Date: Thu Dec  2 14:05:13 2004
New Revision: 109568

URL: http://svn.apache.org/viewcvs?view=rev&rev=109568
Log:
- call modperl_sys_term on the server_pool cleanup
- add a few new traces

Modified:
   perl/modperl/trunk/src/modules/perl/mod_perl.c

Modified: perl/modperl/trunk/src/modules/perl/mod_perl.c
Url: 
http://svn.apache.org/viewcvs/perl/modperl/trunk/src/modules/perl/mod_perl.c?view=diff&rev=109568&p1=perl/modperl/trunk/src/modules/perl/mod_perl.c&r1=109567&p2=perl/modperl/trunk/src/modules/perl/mod_perl.c&r2=109568
==============================================================================
--- perl/modperl/trunk/src/modules/perl/mod_perl.c      (original)
+++ perl/modperl/trunk/src/modules/perl/mod_perl.c      Thu Dec  2 14:05:13 2004
@@ -280,6 +280,7 @@
             newSVpv(ap_server_root_relative(p, "lib/perl"), 0));
 #endif /* MP_COMPAT_1X */
 
+    /* things to be done only in the main server */
     if (!s->is_virtual) {
         modperl_handler_anon_init(aTHX_ p);
     }
@@ -496,6 +497,8 @@
  */
 static apr_status_t modperl_sys_init(void)
 {
+    MP_TRACE_i(MP_FUNC, "mod_perl sys init\n");
+
 #if 0 /*XXX*/
     PERL_SYS_INIT(0, NULL);
 
@@ -523,6 +526,8 @@
 {
     MP_init_status = 0;
 
+    MP_TRACE_i(MP_FUNC, "mod_perl sys term\n");
+
     modperl_env_unload();
 
     modperl_perl_pp_unset_all();
@@ -540,13 +545,15 @@
         return OK;
     }
 
+    MP_TRACE_i(MP_FUNC, "mod_perl hook init\n");
+
     MP_init_status = 1; /* now starting */
 
     apr_pool_create(&server_pool, pconf);
     apr_pool_tag(server_pool, "mod_perl server pool");
 
     modperl_sys_init();
-    apr_pool_cleanup_register(pconf, NULL,
+    apr_pool_cleanup_register(server_pool, NULL,
                               modperl_sys_term, apr_pool_cleanup_null);
 
     modperl_init(s, pconf);

Reply via email to