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

Unified Diff: base/process_util_win.cc

Issue 8964004: check for successful exit code in WaitForSingleProcess on Windows to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « no previous file | chrome/browser/service/service_process_control_browsertest.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 dc165ec3889cace24d2172c2d91db8c3eb9653f5..5a0e5d13608f2c47c967445d80021c8b0d26f8f5 100644
--- a/base/process_util_win.cc
+++ b/base/process_util_win.cc
@@ -607,8 +607,10 @@ bool WaitForProcessesToExit(const std::wstring& executable_name,
}
bool WaitForSingleProcess(ProcessHandle handle, int64 wait_milliseconds) {
- bool retval = WaitForSingleObject(handle, wait_milliseconds) == WAIT_OBJECT_0;
- return retval;
+ int exit_code;
+ if (!WaitForExitCodeWithTimeout(handle, &exit_code, wait_milliseconds))
+ return false;
+ return exit_code == 0;
Reid Kleckner 2011/12/15 22:14:19 This has slightly different semantics from the POS
bruening 2011/12/16 04:08:06 The problem is that on Windows exit codes set by t
Reid Kleckner 2011/12/20 23:43:24 I was going to say that the same thing can happen
}
bool CleanupProcesses(const std::wstring& executable_name,
« no previous file with comments | « no previous file | chrome/browser/service/service_process_control_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698