mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
bugpoint/ToolRunner.cpp: ProcessFailure(): Close ErrorFD immediately, or it couldn't be reopened on Win32.
FIXME: We may have an option in openFileForWrite(), not to use ResultFD but to close it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212902 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e8d826b844
commit
eddc485a8f
@ -148,6 +148,14 @@ static std::string ProcessFailure(StringRef ProgPath, const char** Args,
|
|||||||
errs() << "Error making unique filename: " << EC.message() << "\n";
|
errs() << "Error making unique filename: " << EC.message() << "\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
// Close ErrorFD immediately, or it couldn't be reopened on Win32.
|
||||||
|
// FIXME: We may have an option in openFileForWrite(), not to use ResultFD
|
||||||
|
// but to close it.
|
||||||
|
delete new raw_fd_ostream(ErrorFD, true);
|
||||||
|
#endif
|
||||||
|
|
||||||
RunProgramWithTimeout(ProgPath, Args, "", ErrorFilename.str(),
|
RunProgramWithTimeout(ProgPath, Args, "", ErrorFilename.str(),
|
||||||
ErrorFilename.str(), Timeout, MemoryLimit);
|
ErrorFilename.str(), Timeout, MemoryLimit);
|
||||||
// FIXME: check return code ?
|
// FIXME: check return code ?
|
||||||
|
Loading…
Reference in New Issue
Block a user