Chromium Code Reviews| 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, |