Lines Matching refs:ErrMsg

99 static bool RedirectIO(const 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,
142 return MakeErrMsg(ErrMsg, "Cannot dup2", Err);
183 unsigned memoryLimit, std::string *ErrMsg) {
185 if (ErrMsg)
186 *ErrMsg = std::string("Executable \"") + Program.str() +
216 if (RedirectIO_PS(RedirectsStr[0], 0, ErrMsg, FileActions) ||
217 RedirectIO_PS(RedirectsStr[1], 1, ErrMsg, FileActions))
222 if (RedirectIO_PS(RedirectsStr[2], 2, ErrMsg, FileActions))
228 return !MakeErrMsg(ErrMsg, "Can't redirect stderr to stdout", Err);
251 return !MakeErrMsg(ErrMsg, "posix_spawn failed", Err);
264 MakeErrMsg(ErrMsg, "Couldn't fork");
272 if (RedirectIO(redirects[0], 0, ErrMsg)) { return false; }
274 if (RedirectIO(redirects[1], 1, ErrMsg)) { return false; }
280 MakeErrMsg(ErrMsg, "Can't redirect stderr to stdout");
285 if (RedirectIO(redirects[2], 2, ErrMsg)) { return false; }
325 bool WaitUntilTerminates, std::string *ErrMsg) {
368 MakeErrMsg(ErrMsg, "Child timed out but wouldn't die");
370 MakeErrMsg(ErrMsg, "Child timed out", 0);
375 MakeErrMsg(ErrMsg, "Error waiting for child process");
389 // so we can return -1 for them and set ErrMsg informatively.
396 if (ErrMsg)
397 *ErrMsg = llvm::sys::StrError(ENOENT);
402 if (ErrMsg)
403 *ErrMsg = "Program could not be executed";
408 if (ErrMsg) {
409 *ErrMsg = strsignal(WTERMSIG(status));
412 *ErrMsg += " (core dumped)";