Windows: Removed signal macros in `checks/checker_process.cpp`.

The `__nestedCommandCheck()` implementation in `checker_process.cpp`
uses signals to determine if the task has been killed. This logic has
been removed on Windows, since signals aren't used on Windows. A
different implementation will be needed when nested command checks
work on Windows, but we remove it for now in order to build.

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


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

Branch: refs/heads/master
Commit: 5ca0f5818b282762a94e13854a8ba914fa85edbb
Parents: 4c50a55
Author: Akash Gupta <akash-gu...@hotmail.com>
Authored: Tue Mar 6 13:11:17 2018 -0800
Committer: Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Committed: Tue Mar 6 13:38:56 2018 -0800

----------------------------------------------------------------------
 src/checks/checker_process.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5ca0f581/src/checks/checker_process.cpp
----------------------------------------------------------------------
diff --git a/src/checks/checker_process.cpp b/src/checks/checker_process.cpp
index cf9ec05..7e48451 100644
--- a/src/checks/checker_process.cpp
+++ b/src/checks/checker_process.cpp
@@ -826,13 +826,17 @@ void CheckerProcess::___nestedCommandCheck(
     .onReady([promise](const Option<int>& status) -> void {
       if (status.isNone()) {
         promise->fail("Unable to get the exit code");
-      // TODO(gkleiman): Make sure that the following block works on Windows.
+#ifndef __WINDOWS__
+      // TODO(akagup): Implement this for Windows. The `WaitNestedContainer`
+      // has a `TaskState` field, so we can probably use that for determining
+      // if the task failed.
       } else if (WIFSIGNALED(status.get()) &&
                  WTERMSIG(status.get()) == SIGKILL) {
         // The check container was signaled, probably because the task
         // finished while the check was still in-flight, so we discard
         // the result.
         promise->discard();
+#endif // __WINDOWS__
       } else {
         promise->set(status.get());
       }

Reply via email to