Here is a patch for mod_jk.c to free up all allocated memory during shutdown.  NetWare 
complains about unreleased resources so I found what was being allocated and added an 
exit_handler to free it up.

Mike Anderson
Senior Software Engineer
Platform Services Group
[EMAIL PROTECTED]
Novell, Inc., the leading provider of Net services software
www.novell.com

Index: mod_jk.c
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat/src/native/apache1.3/Attic/mod_jk.c,v
retrieving revision 1.7.2.2
diff -u -r1.7.2.2 mod_jk.c
--- mod_jk.c    2000/10/05 06:32:21     1.7.2.2
+++ mod_jk.c    2001/02/08 16:34:25
@@ -862,6 +862,7 @@
 #endif
 
                 if(wc_open(init_map, conf->log)) {
+                    map_free(&init_map);  // we don't need this any more so free it
                     return;
                 }            
         }
@@ -895,6 +896,18 @@
     return DECLINED;
 }
 
+static void exit_handler (server_rec *s, ap_pool *p)
+{
+   jk_server_conf_t *conf =
+       (jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
+
+   wc_close(conf->log);
+   uri_worker_map_free(&(conf->uw_map), conf->log);
+   map_free(&(conf->uri_to_context));
+   if (conf->log)
+      jk_close_file_logger(&(conf->log));
+}
+
 static const handler_rec jk_handlers[] =
 {
     { JK_MAGIC_TYPE, jk_handler },
@@ -920,7 +933,7 @@
     NULL,                       /* [10] logger */
     NULL,                       /* [3] header parser */
     NULL,                       /* apache child process initializer */
-    NULL,                       /* apache child process exit/cleanup */
+    exit_handler,               /* apache child process exit/cleanup */
     NULL                        /* [1] post read_request handling */
 #ifdef EAPI
     /*

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to