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 2016/08/27 01:20:01 UTC

[2/6] mesos git commit: Windows: Update mesos-executor name.

Windows: Update mesos-executor name.

This replaces the `mesos-executor` string with `mesos-executor.exe`
on Windows to disambiguate between potential extensions.

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


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

Branch: refs/heads/master
Commit: a5f6df606ea6b51bf3eb979d200377ff0959934e
Parents: bda9a50
Author: Daniel Pravat <dp...@outlook.com>
Authored: Fri Aug 26 17:23:18 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Aug 26 18:19:02 2016 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a5f6df60/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 5d162d0..d088d7c 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -125,6 +125,12 @@ using process::Owned;
 using process::Time;
 using process::UPID;
 
+#ifdef __WINDOWS__
+constexpr char MESOS_EXECUTOR[] = "mesos-executor.exe";
+#else
+constexpr char MESOS_EXECUTOR[] = "mesos-executor";
+#endif // __WINDOWS__
+
 namespace mesos {
 namespace internal {
 namespace slave {
@@ -3956,12 +3962,12 @@ ExecutorInfo Slave::getExecutorInfo(
     }
 
     Result<string> path = os::realpath(
-        path::join(flags.launcher_dir, "mesos-executor"));
+        path::join(flags.launcher_dir, MESOS_EXECUTOR));
 
     if (path.isSome()) {
       executor.mutable_command()->set_shell(false);
       executor.mutable_command()->set_value(path.get());
-      executor.mutable_command()->add_arguments("mesos-executor");
+      executor.mutable_command()->add_arguments(MESOS_EXECUTOR);
       executor.mutable_command()->add_arguments(
           "--launcher_dir=" + flags.launcher_dir);
 
@@ -6072,7 +6078,7 @@ Executor::Executor(
   CHECK_NOTNULL(slave);
 
   Result<string> executorPath =
-    os::realpath(path::join(slave->flags.launcher_dir, "mesos-executor"));
+    os::realpath(path::join(slave->flags.launcher_dir, MESOS_EXECUTOR));
 
   if (executorPath.isSome()) {
     commandExecutor =