Lines Matching refs:ErrMsg
99 static bool RedirectIO(std::optional<StringRef> Path, int FD, std::string *ErrMsg) {
112 MakeErrMsg(ErrMsg, "Cannot open file '" + File + "' for " +
119 MakeErrMsg(ErrMsg, "Cannot dup2");
128 static bool RedirectIO_PS(const std::string *Path, int FD, std::string *ErrMsg,
141 return MakeErrMsg(ErrMsg, "Cannot posix_spawn_file_actions_addopen", Err);
178 unsigned MemoryLimit, std::string *ErrMsg,
181 if (ErrMsg)
182 *ErrMsg = std::string("Executable \"") + Program.str() +
228 if (RedirectIO_PS(RedirectsStr[0], 0, ErrMsg, FileActions) ||
229 RedirectIO_PS(RedirectsStr[1], 1, ErrMsg, FileActions))
233 if (RedirectIO_PS(RedirectsStr[2], 2, ErrMsg, FileActions))
239 return !MakeErrMsg(ErrMsg, "Can't redirect stderr to stdout", Err);
266 return !MakeErrMsg(ErrMsg, "posix_spawn failed", Err);
280 MakeErrMsg(ErrMsg, "Couldn't fork");
288 if (RedirectIO(Redirects[0], 0, ErrMsg)) {
292 if (RedirectIO(Redirects[1], 1, ErrMsg)) {
299 MakeErrMsg(ErrMsg, "Can't redirect stderr to stdout");
304 if (RedirectIO(Redirects[2], 2, ErrMsg)) {
390 std::string *ErrMsg,
446 MakeErrMsg(ErrMsg, "Child timed out but wouldn't die");
448 MakeErrMsg(ErrMsg, "Child timed out", 0);
453 MakeErrMsg(ErrMsg, "Error waiting for child process");
479 // so we can return -1 for them and set ErrMsg informatively.
486 if (ErrMsg)
487 *ErrMsg = llvm::sys::StrError(ENOENT);
492 if (ErrMsg)
493 *ErrMsg = "Program could not be executed";
498 if (ErrMsg) {
499 *ErrMsg = strsignal(WTERMSIG(status));
502 *ErrMsg += " (core dumped)";