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/03/06 23:24:28 UTC
[3/8] mesos git commit: Windows: Removed signal macros in
`checks/checker_process.cpp`.
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 <ak...@hotmail.com>
Authored: Tue Mar 6 13:11:17 2018 -0800
Committer: Andrew Schwartzmeyer <an...@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());
}