-*- coding: utf-8 -*-
Changes with Apache 2.2.6
+ *) log core: fix the new piped logger case where we couldn't connect
+ the replacement stderr logger's stderr to the NULL stdout stream.
+ Continue in this case, since the previous alternative of no error
+ logging at all (/dev/null) is far worse. [William Rowe]
+
*) mpm_winnt: Prevent the parent-child pipe from leaking into other
spawned processes, and ensure we have a /Device/null handle for
stdout when running as-a-service. [William Rowe]
http://svn.apache.org/viewvc?view=rev&revision=565671
+1: niq
- * log core: fix the new piped logger case where we couldn't connect
- the replacement stderr logger's stderr to the NULL stdout stream.
- Continue in this case, since the previous alternative of no error
- logging at all (/dev/null) is far worse. [William Rowe]
- http://svn.apache.org/viewvc?view=rev&revision=568326
- disambiguate an error message to diagnose future error reports
- http://svn.apache.org/viewvc?view=rev&revision=568322
- +1: wrowe
- rpluem says: +1 once r568446 is backported.
- jim: Agrees with rpluem.
-
* main core: Emit errors during the initial apr_app_initialize()
or apr_pool_create() (when apr-based error reporting is not ready).
http://svn.apache.org/viewvc?view=rev&revision=568779
}
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rc, NULL,
- "unable to replace stderr with error_log");
+ "unable to replace stderr with error log file");
}
return rc;
}
APR_NO_PIPE,
APR_NO_PIPE)) == APR_SUCCESS)
&& ((rc = apr_procattr_error_check_set(procattr, 1)) == APR_SUCCESS)
- && ((rc = apr_procattr_child_errfn_set(procattr, log_child_errfn)) == APR_SUCCESS)
- && (!dummy_stderr
- || ((rc = apr_file_open_stdout(&errfile, p)) == APR_SUCCESS
- && (rc = apr_procattr_child_err_set(procattr,
- errfile,
- errfile)) == APR_SUCCESS))) {
+ && ((rc = apr_procattr_child_errfn_set(procattr, log_child_errfn))
+ == APR_SUCCESS)) {
char **args;
const char *pname;
apr_tokenize_to_argv(progname, &args, p);
pname = apr_pstrdup(p, args[0]);
procnew = (apr_proc_t *)apr_pcalloc(p, sizeof(*procnew));
+
+ if (dummy_stderr) {
+ if ((rc = apr_file_open_stdout(&errfile, p)) == APR_SUCCESS)
+ rc = apr_procattr_child_err_set(procattr, errfile, NULL);
+ }
+
rc = apr_proc_create(procnew, pname, (const char * const *)args,
NULL, procattr, p);
* close_handle_in_child()
*/
}
-
- /* apr_procattr_child_err_set dups errfile twice: close the
- * remaining "parent-side" copy (apr_proc_create closes the
- * other). */
- if (dummy_stderr) {
- apr_file_close(procnew->err);
- }
}
return rc;