You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/07/11 01:39:16 UTC

[30/50] mesos git commit: Windows: Replaced `ping` with `Start-Sleep`.

Windows: Replaced `ping` with `Start-Sleep`.

This `SLEEP_COMMAND` macro represents a command that should sleep. On
POSIX systems, a `sleep` binary is available, but on Windows, `sleep` is
a `cmd.exe` feature that requires a TTY. Previously, this was replaced
with `ping` as it approximates sleep, except that it produces noisy
output. We replace it with the `Start-Sleep` PowerShell command, which
does not require a TTY, and is always available.

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


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

Branch: refs/heads/master
Commit: 0fb02c875d72d0ed8c6cf13acc5401212f72be50
Parents: d7eee2d
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Mon Jul 10 11:14:31 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Jul 10 17:15:36 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/0fb02c87/3rdparty/stout/include/stout/gtest.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/gtest.hpp b/3rdparty/stout/include/stout/gtest.hpp
index a004a37..1df5eaf 100644
--- a/3rdparty/stout/include/stout/gtest.hpp
+++ b/3rdparty/stout/include/stout/gtest.hpp
@@ -226,7 +226,7 @@ template <typename T1, typename T2>
 #ifndef __WINDOWS__
 #define SLEEP_COMMAND(x) "sleep " #x
 #else
-#define SLEEP_COMMAND(x) (x > 0 ? "ping 127.0.0.1 -n " #x : "cmd /C exit 0")
+#define SLEEP_COMMAND(x) "powershell -NoProfile -Command Start-Sleep " #x
 #endif // __WINDOWS__