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

Issue 12038059: Windows: Fix --enable-logging to not disable logging when stderr is a pipe (Closed)

Created:
7 years, 11 months ago by Mark Seaborn
Modified:
7 years, 11 months ago
Reviewers:
brettw, M-A Ruel, jbates
CC:
chromium-reviews, erikwright+watch_chromium.org, M-A Ruel
Visibility:
Public.

Description

Windows: Fix --enable-logging to not disable logging when stderr is a pipe Before this change, when chrome.exe is run under Buildbot or under Cygwin's default terminal (mintty), passing --enable-logging (which calls RouteStdioToConsole()) has the unfortunate side effect of disabling logging from the browser process. In these cases, stderr is a pipe handle, not a Windows console, and opening CONOUT$ gives a console handle whose output doesn't go anywhere. (Note that this does not apply to browser_tests.exe, which has subsystem=console in its headers. In this case, the browser process is already attached to a non-visible console at startup, and RouteStdioToConsole() exits via the ERROR_ACCESS_DENIED path.) We fix this by making RouteStdioToConsole() a no-op if stdout/stderr already point to valid streams. BUG=169941 TEST=Ran chrome.exe and browser_tests.exe from both Cygwin mintty and the Windows console, with some extra logging added; checked that logging is displayed. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=178656

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -0 lines) Patch
M base/process_util_win.cc View 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Mark Seaborn
(Sending to original authors/reviewers of https://chromiumcodereview.appspot.com/10832309)
7 years, 11 months ago (2013-01-24 18:22:21 UTC) #1
M-A Ruel
Not that I'm an owner but it makes sense, lgtm
7 years, 11 months ago (2013-01-24 18:25:53 UTC) #2
brettw
LGTM rubberstamp based on maruel's review.
7 years, 11 months ago (2013-01-24 21:36:19 UTC) #3
jbates
7 years, 11 months ago (2013-01-24 21:44:31 UTC) #4
lgtm

Powered by Google App Engine
This is Rietveld 408576698