summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--execute.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/execute.cc b/execute.cc
index bb691cf..bc4cd5f 100644
--- a/execute.cc
+++ b/execute.cc
@@ -66,6 +66,9 @@ int execute(const std::string& command,
if(pid == 0)
{
execv(command.data(), (char**)argv.data());
+ std::cout << "Could not execute " << command << ": " <<
+ strerror(errno) << "\n";
+ _exit(1); // execv only returns if an error occurred
}
auto ret = parent_waitpid(pid);
#elif 0