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:04 UTC

[5/6] mesos git commit: Windows: Excluded UNIX-style `PATH` environment variable.

Windows: Excluded UNIX-style `PATH` environment variable.

The default `PATH` used to launch an executor is UNIX-specific.
On Windows, this `PATH` is determined by system settings.

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


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

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

----------------------------------------------------------------------
 src/slave/slave.cpp | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/87ba0efa/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index d088d7c..1166477 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -6340,11 +6340,15 @@ map<string, string> executorEnvironment(
     }
   }
 
+#ifndef __WINDOWS__
   // Include a default $PATH if there isn't.
+  // On Windows, we ensure the path is set by checking the system environment.
+  // See `createProcessEnvironment` in `process/windows/subprocess.hpp`.
   if (environment.count("PATH") == 0) {
     environment["PATH"] =
       "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
   }
+#endif // __WINDOWS__
 
   // Set LIBPROCESS_PORT so that we bind to a random free port (since
   // this might have been set via --port option). We do this before