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

Unified Diff: base/process_util_win.cc

Issue 10918255: The Windows portion of Native Messagaing (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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') | chrome/browser/extensions/api/messaging/message_service.cc » ('j') | 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..d0dc103d21dfe0cc5251932b3809e31be421acb5 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(startup_info.inherit_handles);
+ DCHECK(options.stdin_handle);
+ startup_info.dwFlags |= STARTF_USESTDHANDLES;
+ startup_info.hStdInput = options.stdin_handle;
+ startup_info.hStdOutput = options.stdout_handle ?
+ options.stdout_handle : GetStdHandle(STD_OUTPUT_HANDLE);
+ startup_info.hStdError = options.stderr_handle ?
+ options.stderr_handle : GetStdHandle(STD_ERROR_HANDLE);
+ }
+
DWORD flags = 0;
if (options.job_handle) {
« no previous file with comments | « base/process_util.h ('k') | chrome/browser/extensions/api/messaging/message_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698