Attached is a patch for mod_jk.c to more cleanly handle a bad path for the workers.properties file. Currently, this is handled in jk_init and if the call to map_read_properties fails, then we just call jk_error_exit which in turn calls exit(1). This causes some problems on NetWare because we don't go through all of the Apache cleanup code and so we can't restart Apache. The attached patch just places a stat call in jk_set_wroker_file to test for the workers.properties file. Since this is called during the configuration file parse, the error is reported earlier and allows Apache the shutdown cleanly. I've built and tested this for NetWare, Linux, and Windows. 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.3 diff -u -r1.7.2.3 mod_jk.c --- mod_jk.c 2001/02/17 05:24:00 1.7.2.3 +++ mod_jk.c 2001/04/04 22:18:23 @@ -477,8 +477,11 @@ server_rec *s = cmd->server; jk_server_conf_t *conf = (jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module); + struct stat statbuf; conf->worker_file = worker_file; + if (stat(worker_file, &statbuf) == -1) + return "Can't find the workers file specified"; return NULL; }