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/03/11 18:05:21 UTC

[7/8] mesos git commit: Windows: [2/3] Used `os::execlp` in launch.cpp.

Windows: [2/3] Used `os::execlp` in launch.cpp.

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


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

Branch: refs/heads/master
Commit: 81e893d5cdb8a5873dd0c61ad7eceaa323aff466
Parents: e48794b
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Mar 11 11:29:27 2016 -0500
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Fri Mar 11 12:04:24 2016 -0500

----------------------------------------------------------------------
 src/slave/containerizer/mesos/launch.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/81e893d5/src/slave/containerizer/mesos/launch.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/launch.cpp b/src/slave/containerizer/mesos/launch.cpp
index 9fb55aa..dc7bebf 100644
--- a/src/slave/containerizer/mesos/launch.cpp
+++ b/src/slave/containerizer/mesos/launch.cpp
@@ -16,7 +16,6 @@
 
 #include <errno.h>
 #include <string.h>
-#include <unistd.h>
 
 #include <iostream>
 
@@ -287,9 +286,10 @@ int MesosContainerizerLaunch::execute()
 
   if (command.get().shell()) {
     // Execute the command using shell.
-    execlp("sh", "sh", "-c", command.get().value().c_str(), (char*) NULL);
+    os::execlp(os::Shell::name, os::Shell::arg0,
+               os::Shell::arg1, command.get().value().c_str(), (char*) NULL);
   } else {
-    // Use os::execvpe to launch the command.
+    // Use execvp to launch the command.
     char** argv = new char*[command.get().arguments().size() + 1];
     for (int i = 0; i < command.get().arguments().size(); i++) {
       argv[i] = strdup(command.get().arguments(i).c_str());