Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 13805 invoked by uid 500); 7 Sep 2001 00:00:03 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 13796 invoked from network); 7 Sep 2001 00:00:03 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Ryan Bloom Reply-To: rbb@covalent.net Organization: Covalent Technologies To: tomcat-dev@jakarta.apache.org Subject: [PATCH] only parse workers.properties once Date: Thu, 6 Sep 2001 16:59:43 -0700 X-Mailer: KMail [version 1.3] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20010906235943.752D546DF4@koj.rkbloom.net> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 --------------------------------------------------------------