Lines Matching refs:ErrMsg
97 static bool RedirectIO(Optional<StringRef> Path, int FD, std::string* ErrMsg) {
110 MakeErrMsg(ErrMsg, "Cannot open file '" + File + "' for "
117 MakeErrMsg(ErrMsg, "Cannot dup2");
126 static bool RedirectIO_PS(const std::string *Path, int FD, std::string *ErrMsg,
140 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)) { return false; }
290 if (RedirectIO(Redirects[1], 1, ErrMsg)) { return false; }
295 MakeErrMsg(ErrMsg, "Can't redirect stderr to stdout");
300 if (RedirectIO(Redirects[2], 2, ErrMsg)) { return false; }
383 bool WaitUntilTerminates, std::string *ErrMsg,
433 MakeErrMsg(ErrMsg, "Child timed out but wouldn't die");
435 MakeErrMsg(ErrMsg, "Child timed out", 0);
440 MakeErrMsg(ErrMsg, "Error waiting for child process");
464 // so we can return -1 for them and set ErrMsg informatively.
471 if (ErrMsg)
472 *ErrMsg = llvm::sys::StrError(ENOENT);
477 if (ErrMsg)
478 *ErrMsg = "Program could not be executed";
483 if (ErrMsg) {
484 *ErrMsg = strsignal(WTERMSIG(status));
487 *ErrMsg += " (core dumped)";