tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject [PATCH] only parse workers.properties once
Date Thu, 06 Sep 2001 23:59:43 GMT

This is an improvement for mod_jk, to only parse workers.properties once
on platforms that use fork().  Most platforms will not require us to read
the workers.properties file in the child process, because they process it in
the parent.  Windows is the only platform I know of today that does require
us to read it twice.

This also has the advantage, that the workers.properties file does not need
to be readable by the user that the web server is running as.

Ryan

Index: mod_jk.c
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
retrieving revision 1.23
diff -u -d -b -w -u -r1.23 mod_jk.c
--- mod_jk.c	2001/09/06 17:00:54	1.23
+++ mod_jk.c	2001/09/06 21:54:01
@@ -1214,6 +1214,7 @@
     return overrides;
 }
 
+#ifdef WIN32
 /** Standard apache callback, initialize jk.
  */
 static void jk_child_init(apr_pool_t *pconf, 
@@ -1224,6 +1225,7 @@
 
     init_jk( pconf, conf, s );
 }
+#endif
 
 /** Initialize jk, using worker.properties. 
     We also use apache commands ( JkWorker, etc), but this use is 
@@ -1340,7 +1342,9 @@
 {
     ap_hook_handler(jk_handler, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_post_config(jk_post_config,NULL,NULL,APR_HOOK_MIDDLE);
+#ifdef WIN32
     ap_hook_child_init(jk_child_init,NULL,NULL,APR_HOOK_MIDDLE);
+#endif
     ap_hook_translate_name(jk_translate,NULL,NULL,APR_HOOK_FIRST);
 #if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
     ap_hook_map_to_storage(jk_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);


______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Mime
View raw message