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

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: Windows is Ready Created 8 years, 2 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
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,

Powered by Google App Engine
This is Rietveld 408576698