Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: trunk/src/base/process/launch_win.cc

Issue 327023002: Revert 276039 "Another try at fixing --enable-logging on Windows" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/base/process/launch_win.cc
===================================================================
--- trunk/src/base/process/launch_win.cc (revision 276122)
+++ trunk/src/base/process/launch_win.cc (working copy)
@@ -64,17 +64,7 @@
// stdout/stderr on startup (before the handle IDs can be reused).
// _fileno(stdout) will return -2 (_NO_CONSOLE_FILENO) if stdout was
// invalid.
-
- // TODO(scottmg):
- // Unfortunately _fileno was broken in VS2012, and is still broken in VS2013.
- // https://connect.microsoft.com/VisualStudio/feedback/details/785119/
- // http://crbug.com/358267
- // It never returns -2 as it is documented to do (and per above) when in a
- // windowed application without a console. As a result, we have to use
- // GetStdHandle, even though it's not strictly correct. Hopefully this can
- // be removed after a future revision of the CRT.
- if ((_fileno(stdout) >= 0 && GetStdHandle(STD_OUTPUT_HANDLE) != NULL) ||
- (_fileno(stderr) >= 0 && GetStdHandle(STD_ERROR_HANDLE)) != NULL)
+ if (_fileno(stdout) >= 0 || _fileno(stderr) >= 0)
return;
if (!AttachConsole(ATTACH_PARENT_PROCESS)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698