httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chr...@apache.org
Subject svn commit: r491907 - in /httpd/httpd/trunk: CHANGES server/mpm/netware/mpm_netware.c
Date Tue, 02 Jan 2007 19:40:34 GMT
Author: chrisd
Date: Tue Jan  2 11:40:34 2007
New Revision: 491907

URL: http://svn.apache.org/viewvc?view=rev&rev=491907
Log:
Destroy pmain pool when exiting ap_mpm_run() so that cleanups
registered in modules' child_init hooks are performed (e.g.,
mod_log_config and mod_dbd).

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/server/mpm/netware/mpm_netware.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?view=diff&rev=491907&r1=491906&r2=491907
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Jan  2 11:40:34 2007
@@ -2,6 +2,10 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) netware MPM: Destroy pmain pool when exiting ap_mpm_run() so that
+     cleanups registered in modules' child_init hooks are performed.
+     [Chris Darroch]
+
   *) mod_dbd: Handle error conditions in dbd_construct() properly.
      Simplify ap_dbd_open() and use correct arguments to apr_dbd_error()
      when non-threaded.  Register correct cleanup data in non-threaded

Modified: httpd/httpd/trunk/server/mpm/netware/mpm_netware.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/netware/mpm_netware.c?view=diff&rev=491907&r1=491906&r2=491907
==============================================================================
--- httpd/httpd/trunk/server/mpm/netware/mpm_netware.c (original)
+++ httpd/httpd/trunk/server/mpm/netware/mpm_netware.c Tue Jan  2 11:40:34 2007
@@ -191,6 +191,14 @@
     NXThreadExit((void*)&code);
 }
 
+/* proper cleanup when returning from ap_mpm_run() */
+static void mpm_main_cleanup(void)
+{
+    if (pmain) {
+        apr_pool_destroy(pmain);
+    }
+}
+
 AP_DECLARE(apr_status_t) ap_mpm_query(int query_code, int *result)
 {
     switch(query_code){
@@ -934,6 +942,7 @@
             apr_thread_yield();
         }
 
+        mpm_main_cleanup();
         return 1;
     }
     else {  /* the only other way out is a restart */
@@ -956,6 +965,7 @@
         printf ("\nRestarting...\n");
     }
 
+    mpm_main_cleanup();
     return 0;
 }
 



Mime
View raw message