We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47d79db commit 286fe46Copy full SHA for 286fe46
src/mp/util.cpp
@@ -7,6 +7,8 @@
7
8
#include <cerrno>
9
#include <cstdio>
10
+#include <filesystem>
11
+#include <iostream>
12
#include <kj/common.h>
13
#include <kj/string-tree.h>
14
#include <pthread.h>
@@ -29,6 +31,8 @@
29
31
#include <pthread_np.h>
30
32
#endif // HAVE_PTHREAD_GETTHREADID_NP
33
34
+namespace fs = std::filesystem;
35
+
36
namespace mp {
37
namespace {
38
@@ -138,6 +142,9 @@ void ExecProcess(const std::vector<std::string>& args)
138
142
argv.push_back(nullptr);
139
143
if (execvp(argv[0], argv.data()) != 0) {
140
144
perror("execvp failed");
145
+ if (errno == ENOENT && !args.empty()) {
146
+ std::cerr << "Missing executable: " << fs::weakly_canonical(args.front()) << '\n';
147
+ }
141
148
_exit(1);
149
}
150
0 commit comments