You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/11/04 02:30:46 UTC

svn commit: r1405479 - /incubator/mesos/branches/0.10.0/src/launcher/executor.cpp

Author: benh
Date: Sun Nov  4 01:30:45 2012
New Revision: 1405479

URL: http://svn.apache.org/viewvc?rev=1405479&view=rev
Log:
Added some more logging output to mesos-executor.

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

Modified:
    incubator/mesos/branches/0.10.0/src/launcher/executor.cpp

Modified: incubator/mesos/branches/0.10.0/src/launcher/executor.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/branches/0.10.0/src/launcher/executor.cpp?rev=1405479&r1=1405478&r2=1405479&view=diff
==============================================================================
--- incubator/mesos/branches/0.10.0/src/launcher/executor.cpp (original)
+++ incubator/mesos/branches/0.10.0/src/launcher/executor.cpp Sun Nov  4 01:30:45 2012
@@ -122,13 +122,18 @@ public:
     std::cout << "Starting task " << task.task_id().value() << std::endl;
 
     if ((pid = fork()) == -1) {
-      PLOG(FATAL) << "Failed to fork to run " << task.command().value();
+      std::cerr << "Failed to fork to run '" << task.command().value() << "': "
+                << strerror(errno) << std::endl;
+      abort();
     }
 
     if (pid == 0) {
       // In child process, execute the command (via '/bin/sh -c command').
+      std::cout << "sh -c '" << task.command().value() << "'" << std::endl;
       execl("/bin/sh", "sh", "-c",
             task.command().value().c_str(), (char*) NULL);
+      std::cerr << "Failed to exec: " << strerror(errno) << std::endl;
+      abort();
     }
 
     // In parent process, fork a thread to wait for this process.