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

Unified Diff: base/process_util_win.cc

Issue 11419267: Add stdin_handle and stdout_handle in base::LaunchOptions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « base/process_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_win.cc
diff --git a/base/process_util_win.cc b/base/process_util_win.cc
index a1a55ea6e4b73abd8a571f263aa66c24c9cf01fd..3addf51b669030ea635ffa28f5cdac7faf5f5675 100644
--- a/base/process_util_win.cc
+++ b/base/process_util_win.cc
@@ -293,6 +293,17 @@ bool LaunchProcess(const string16& cmdline,
startup_info.dwFlags = STARTF_USESHOWWINDOW;
startup_info.wShowWindow = options.start_hidden ? SW_HIDE : SW_SHOW;
+ if (options.stdin_handle || options.stdout_handle || options.stderr_handle) {
+ DCHECK(options.inherit_handles);
+ DCHECK(options.stdin_handle);
+ DCHECK(options.stdout_handle);
+ DCHECK(options.stderr_handle);
+ startup_info.dwFlags |= STARTF_USESTDHANDLES;
+ startup_info.hStdInput = options.stdin_handle;
+ startup_info.hStdOutput = options.stdout_handle;
+ startup_info.hStdError = options.stderr_handle;
+ }
+
DWORD flags = 0;
if (options.job_handle) {
« no previous file with comments | « base/process_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698