yoavs 2004/06/16 07:34:07 Modified: jk/native2/common jk_logger_file.c Log: Bugzilla 28469 done. Revision Changes Path 1.45 +14 -3 jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c Index: jk_logger_file.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- jk_logger_file.c 21 Mar 2004 09:43:09 -0000 1.44 +++ jk_logger_file.c 16 Jun 2004 14:34:07 -0000 1.45 @@ -103,8 +103,17 @@ apr_status_t rv; apr_file_t *oldF = (apr_file_t *) _this->logger_private; + int closeOld; apr_file_t *f = NULL; jk_workerEnv_t *workerEnv = env->getByName(env, "workerEnv"); + + /* workaround for APR insanity - APR closes the global system + stderr handle and invalidates all references to stderr if you + call apr_file_close on any stderr reference. Just don't close + stderr references. */ + closeOld = oldF != NULL && _this->name != NULL && + strcmp("stderr", _this->name) != 0; + if (!_this->name) { _this->name = "${serverRoot}/logs/jk2.log"; } @@ -133,9 +142,11 @@ } _this->jkLog(env, _this, JK_LOG_INFO, "Initializing log file %s\n", _this->name); - if (oldF) { - apr_file_close(oldF); + + if (closeOld) { + apr_file_close(oldF); } + return JK_OK; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]