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/10/13 02:54:58 UTC
svn commit: r1397748 - /incubator/mesos/trunk/src/launcher/executor.cpp
Author: benh
Date: Sat Oct 13 00:54:57 2012
New Revision: 1397748
URL: http://svn.apache.org/viewvc?rev=1397748&view=rev
Log:
Added some more logging output to mesos-executor.
Review: https://reviews.apache.org/r/7538
Modified:
incubator/mesos/trunk/src/launcher/executor.cpp
Modified: incubator/mesos/trunk/src/launcher/executor.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/launcher/executor.cpp?rev=1397748&r1=1397747&r2=1397748&view=diff
==============================================================================
--- incubator/mesos/trunk/src/launcher/executor.cpp (original)
+++ incubator/mesos/trunk/src/launcher/executor.cpp Sat Oct 13 00:54:57 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.