Changes with Apache 2.3.0
[Remove entries to the current 2.0 and 2.2 section below, when backported]
+ *) Fix issue which could cause error messages to be written to access logs
+ on Win32. PR 40476. [Tom Donovan <Tom.Donovan acm.org>]
+
*) The LockFile directive, which specifies the location of
the accept() mutex lockfile, is depreciated. Instead, the
AcceptMutex directive now takes an optional lockfile
int ap_open_logs(apr_pool_t *pconf, apr_pool_t *p /* plog */,
apr_pool_t *ptemp, server_rec *s_main)
{
- apr_status_t rc = APR_SUCCESS;
server_rec *virt, *q;
int replace_stderr;
- apr_file_t *errfile = NULL;
apr_pool_cleanup_register(p, NULL, clear_handle_list,
apr_pool_cleanup_null);
replace_stderr = 1;
if (s_main->error_log) {
- /* replace stderr with this new log */
+ apr_status_t rv;
+
+ /* Replace existing stderr with new log. */
apr_file_flush(s_main->error_log);
- if ((rc = apr_file_open_stderr(&errfile, p)) == APR_SUCCESS) {
- rc = apr_file_dup2(errfile, s_main->error_log, p);
- }
- if (rc != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s_main,
+ rv = apr_file_dup2(stderr_log, s_main->error_log, p);
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s_main,
"unable to replace stderr with error_log");
}
else {