2.4.x: trunk works modulo CHANGES
+1: rjung, covener, jim
- * Error log on Windows: Fix the name of the null device to fix failure
- to discard stderr.
- trunk patch: https://svn.apache.org/r1527008
- 2.4.x: trunk patch works
- +1: trawick, covener, jim
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
* XXX: This is BS - /dev/null is non-portable
* errno-as-apr_status_t is also non-portable
*/
- if (replace_stderr && freopen("/dev/null", "w", stderr) == NULL) {
+
+#ifdef WIN32
+#define NULL_DEVICE "nul"
+#else
+#define NULL_DEVICE "/dev/null"
+#endif
+
+ if (replace_stderr && freopen(NULL_DEVICE, "w", stderr) == NULL) {
ap_log_error(APLOG_MARK, APLOG_CRIT, errno, s_main, APLOGNO(00093)
- "unable to replace stderr with /dev/null");
+ "unable to replace stderr with %s", NULL_DEVICE);
}
for (virt = s_main->next; virt; virt = virt->next) {