• Home
  • Raw
  • Download

Lines Matching refs:ErrMsg

96 static bool RedirectIO(Optional<StringRef> Path, int FD, std::string* ErrMsg) {
109 MakeErrMsg(ErrMsg, "Cannot open file '" + File + "' for "
116 MakeErrMsg(ErrMsg, "Cannot dup2");
125 static bool RedirectIO_PS(const std::string *Path, int FD, std::string *ErrMsg,
139 return MakeErrMsg(ErrMsg, "Cannot posix_spawn_file_actions_addopen", Err);
177 unsigned MemoryLimit, std::string *ErrMsg) {
179 if (ErrMsg)
180 *ErrMsg = std::string("Executable \"") + Program.str() +
223 if (RedirectIO_PS(RedirectsStr[0], 0, ErrMsg, FileActions) ||
224 RedirectIO_PS(RedirectsStr[1], 1, ErrMsg, FileActions))
228 if (RedirectIO_PS(RedirectsStr[2], 2, ErrMsg, FileActions))
234 return !MakeErrMsg(ErrMsg, "Can't redirect stderr to stdout", Err);
261 return !MakeErrMsg(ErrMsg, "posix_spawn failed", Err);
275 MakeErrMsg(ErrMsg, "Couldn't fork");
283 if (RedirectIO(Redirects[0], 0, ErrMsg)) { return false; }
285 if (RedirectIO(Redirects[1], 1, ErrMsg)) { return false; }
290 MakeErrMsg(ErrMsg, "Can't redirect stderr to stdout");
295 if (RedirectIO(Redirects[2], 2, ErrMsg)) { return false; }
378 bool WaitUntilTerminates, std::string *ErrMsg,
428 MakeErrMsg(ErrMsg, "Child timed out but wouldn't die");
430 MakeErrMsg(ErrMsg, "Child timed out", 0);
435 MakeErrMsg(ErrMsg, "Error waiting for child process");
456 // so we can return -1 for them and set ErrMsg informatively.
463 if (ErrMsg)
464 *ErrMsg = llvm::sys::StrError(ENOENT);
469 if (ErrMsg)
470 *ErrMsg = "Program could not be executed";
475 if (ErrMsg) {
476 *ErrMsg = strsignal(WTERMSIG(status));
479 *ErrMsg += " (core dumped)";