You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2018/06/07 22:26:03 UTC

mesos git commit: Windows: Fixed incorrect return code for `os:kill`.

Repository: mesos
Updated Branches:
  refs/heads/master c185752b7 -> 5e1d8627b


Windows: Fixed incorrect return code for `os:kill`.

`os::kill` was returning the opposite error code than expected. It
was returning `KILL_FAIL` on success and `KILL_PASS` on error.

Review: https://reviews.apache.org/r/67455/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5e1d8627
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5e1d8627
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5e1d8627

Branch: refs/heads/master
Commit: 5e1d8627bbbf79eb00e7f4ddd111ba6109613e0b
Parents: c185752
Author: Akash Gupta <ak...@hotmail.com>
Authored: Thu Jun 7 15:07:14 2018 -0700
Committer: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Committed: Thu Jun 7 15:07:14 2018 -0700

----------------------------------------------------------------------
 3rdparty/stout/include/stout/os/windows/kill.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5e1d8627/3rdparty/stout/include/stout/os/windows/kill.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/os/windows/kill.hpp b/3rdparty/stout/include/stout/os/windows/kill.hpp
index bdb8351..bd94435 100644
--- a/3rdparty/stout/include/stout/os/windows/kill.hpp
+++ b/3rdparty/stout/include/stout/os/windows/kill.hpp
@@ -37,7 +37,7 @@ inline int kill_process(pid_t pid)
 
   SharedHandle safe_process_handle(process_handle, ::CloseHandle);
 
-  if (::TerminateProcess(safe_process_handle.get_handle(), 1) != 0) {
+  if (::TerminateProcess(safe_process_handle.get_handle(), 1) == 0) {
     LOG(ERROR) << "os::kill_process(): Failed call to TerminateProcess";
 
     return KILL_FAIL;