diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-11 22:59:48 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-11 22:59:48 +0000 |
commit | 659c19560c41ea3e4e283ebac8b1b6088a82143b (patch) | |
tree | 03fc953e87f64e44b65aa1eacb3b0e66f16949ed /sandbox/src | |
parent | 2de7e004b9e0cede80a1955d99d01a1e484182d9 (diff) | |
download | chromium_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 'sandbox/src')
-rw-r--r-- | sandbox/src/target_process.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sandbox/src/target_process.cc b/sandbox/src/target_process.cc index a9848c5..f0a40bd 100644 --- a/sandbox/src/target_process.cc +++ b/sandbox/src/target_process.cc @@ -136,6 +136,11 @@ DWORD TargetProcess::Create(const wchar_t* exe_path, startup_info.lpDesktop = desktop_name.get(); } + // Hook up stdout/stderr. + startup_info.dwFlags = STARTF_USESTDHANDLES; + startup_info.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); + startup_info.hStdError = GetStdHandle(STD_ERROR_HANDLE); + PROCESS_INFORMATION process_info = {0}; if (!::CreateProcessAsUserW(lockdown_token_, |