Chromium Code Reviews| Index: base/process_util_win.cc |
| diff --git a/base/process_util_win.cc b/base/process_util_win.cc |
| index da2b6e64aa1e148998050af36362fb037135e7d7..015c05ea1c68882f48441a8346f456d57036eb7d 100644 |
| --- a/base/process_util_win.cc |
| +++ b/base/process_util_win.cc |
| @@ -306,6 +306,15 @@ bool LaunchProcess(const string16& cmdline, |
| startup_info.dwFlags = STARTF_USESHOWWINDOW; |
| startup_info.wShowWindow = options.start_hidden ? SW_HIDE : SW_SHOW; |
| + if (options.stdin_handle != kNullProcessHandle) { |
| + startup_info.dwFlags |= STARTF_USESTDHANDLES; |
| + startup_info.hStdInput = options.stdin_handle; |
| + } |
| + if (options.stdout_handle != kNullProcessHandle) { |
| + startup_info.dwFlags |= STARTF_USESTDHANDLES; |
| + startup_info.hStdOutput = options.stdout_handle; |
| + } |
| + |
| DWORD flags = 0; |
| if (options.job_handle) { |
| @@ -339,6 +348,7 @@ bool LaunchProcess(const string16& cmdline, |
| if (!launched) |
| return false; |
| } else { |
| + ::SetLastError(0); |
|
Matt Perry
2012/10/24 23:40:31
Is this needed?
eaugusti
2012/10/30 22:03:12
Stray edit.
|
| if (!CreateProcess(NULL, |
| const_cast<wchar_t*>(cmdline.c_str()), NULL, NULL, |
| options.inherit_handles, flags, NULL, NULL, |