diff options
author | 2016-07-20 12:27:00 +0000 | |
---|---|---|
committer | 2016-07-20 15:01:42 +0000 | |
commit | 9520447f0b743e70f81489b87235c0b77ba51366 (patch) | |
tree | dedbc57574e6e7033af09884c06a533055bc72af /src/main | |
parent | 3bed4af4f27bbd22b5531454095f0eda30bfac9f (diff) |
Fix various breakages in Windows process handling that creeped in because we weren't actually running the test:
- Call TerminateProcess() only if the process handle is still open
- Update the tests so that they expect a return value of 0 when reading a stream from a non-existent process
Fixes #1538 .
--
Change-Id: I4de28abbba2e2e89f285d7b8fb75bcd9af345f14
Reviewed-on: https://bazel-review.googlesource.com/4100
MOS_MIGRATED_REVID=127935621
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/native/windows_processes.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/native/windows_processes.cc b/src/main/native/windows_processes.cc index 6b6a2929d0..5167857c5e 100644 --- a/src/main/native/windows_processes.cc +++ b/src/main/native/windows_processes.cc @@ -450,7 +450,7 @@ Java_com_google_devtools_build_lib_windows_WindowsProcesses_nativeTerminate( process->error_ = GetLastErrorString("TerminateJobObject()"); return JNI_FALSE; } - } else { + } else if (process->process_ != INVALID_HANDLE_VALUE) { if (!TerminateProcess(process->process_, 1)) { process->error_ = GetLastErrorString("TerminateProcess()"); return JNI_FALSE; |