summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 22:59:48 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-11 22:59:48 +0000
commit659c19560c41ea3e4e283ebac8b1b6088a82143b (patch)
tree03fc953e87f64e44b65aa1eacb3b0e66f16949ed /base
parent2de7e004b9e0cede80a1955d99d01a1e484182d9 (diff)
downloadchromium_src-659c19560c41ea3e4e283ebac8b1b6088a82143b.zip
chromium_src-659c19560c41ea3e4e283ebac8b1b6088a82143b.tar.gz
chromium_src-659c19560c41ea3e4e283ebac8b1b6088a82143b.tar.bz2
Make writing to stdout and stderr work in Chrome processes when inherited
handles are available. Don't create a console, just attach to any existing console. R=cpu BUG=none TEST=none Review URL: http://codereview.chromium.org/3574008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/process_util_win.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/process_util_win.cc b/base/process_util_win.cc
index c5d7790..8738b9a 100644
--- a/base/process_util_win.cc
+++ b/base/process_util_win.cc
@@ -196,8 +196,10 @@ bool LaunchAppImpl(const std::wstring& cmdline,
ProcessHandle* process_handle) {
STARTUPINFO startup_info = {0};
startup_info.cb = sizeof(startup_info);
- startup_info.dwFlags = STARTF_USESHOWWINDOW;
+ startup_info.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
startup_info.wShowWindow = start_hidden ? SW_HIDE : SW_SHOW;
+ startup_info.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
+ startup_info.hStdError = GetStdHandle(STD_ERROR_HANDLE);
PROCESS_INFORMATION process_info;
if (!CreateProcess(NULL,
const_cast<wchar_t*>(cmdline.c_str()), NULL, NULL,