You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2013/10/08 16:17:33 UTC
svn commit: r1530279 - in /httpd/httpd/branches/2.4.x: ./ STATUS server/log.c
Author: jim
Date: Tue Oct 8 14:17:33 2013
New Revision: 1530279
URL: http://svn.apache.org/r1530279
Log:
Merge r1527008 from trunk:
Fix the null device name on Windows so that stderr can be sent
to the bit bucket. (This logic is always hit when using an error
log provider.)
Submitted by: trawick
Reviewed/backported by: jim
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/STATUS
httpd/httpd/branches/2.4.x/server/log.c
Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1527008
Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1530279&r1=1530278&r2=1530279&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Tue Oct 8 14:17:33 2013
@@ -109,12 +109,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
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 ]
Modified: httpd/httpd/branches/2.4.x/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/log.c?rev=1530279&r1=1530278&r2=1530279&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/log.c (original)
+++ httpd/httpd/branches/2.4.x/server/log.c Tue Oct 8 14:17:33 2013
@@ -509,9 +509,16 @@ int ap_open_logs(apr_pool_t *pconf, apr_
* 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) {