Adding error messaging when failing to execvpe

This commit is contained in:
Ian Roddis
2022-02-23 21:36:48 -04:00
parent 0b195da309
commit 4e5ca633d8

View File

@@ -174,6 +174,7 @@ daggy::AttemptRecord ForkingTaskExecutor::runTask(const Task &task,
close(stderrPipe[0]);
char **env = (envp.empty() ? nullptr : envp.data());
execvpe(argv[0], argv.data(), env);
std::cerr << "Unable to launch \"" << argv[0] << "\": " << std::strerror(errno) << std::endl;
exit(errno);
}