stas 2004/05/09 15:43:57
Modified: src/modules/perl mod_perl.c
Log:
we need to dup the filehandle so that when the server shuts down, we will
be able to log traces to error_log after Apache has closed it (which
happens too early for our likening).
Revision Changes Path
1.213 +11 -2 modperl-2.0/src/modules/perl/mod_perl.c
Index: mod_perl.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -u -r1.212 -r1.213
--- mod_perl.c 2 Apr 2004 02:17:45 -0000 1.212
+++ mod_perl.c 9 May 2004 22:43:57 -0000 1.213
@@ -584,8 +584,17 @@
* change, even though it still points to the same physical file
* (.e.g on win32 the filehandle will be different. Therefore
* reset the tracing logfile setting here, since this is the
- * earliest place, happening after the open_logs phase */
- modperl_trace_logfile_set(s->error_log);
+ * earliest place, happening after the open_logs phase.
+ *
+ * Moreover, we need to dup the filehandle so that when the server
+ * shuts down, we will be able to log to error_log after Apache
+ * has closed it (which happens too early for our likening).
+ */
+ {
+ apr_file_t *dup;
+ MP_FAILURE_CROAK(apr_file_dup(&dup, s->error_log, pconf));
+ modperl_trace_logfile_set(dup);
+ }
#endif
ap_add_version_component(pconf, MP_VERSION_STRING);