forked from OSchip/llvm-project
[clangd] Flush stderr after signal handlers run, so we always get the full stack/crash info
This commit is contained in:
parent
413e249a47
commit
aa1ac2ae45
|
@ -681,7 +681,12 @@ int main(int argc, char *argv[]) {
|
|||
llvm::InitializeAllTargetInfos();
|
||||
llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
|
||||
llvm::sys::AddSignalHandler(
|
||||
[](void *) { ThreadCrashReporter::runCrashHandlers(); }, nullptr);
|
||||
[](void *) {
|
||||
ThreadCrashReporter::runCrashHandlers();
|
||||
// Ensure ThreadCrashReporter and PrintStackTrace output is visible.
|
||||
llvm::errs().flush();
|
||||
},
|
||||
nullptr);
|
||||
llvm::sys::SetInterruptFunction(&requestShutdown);
|
||||
llvm::cl::SetVersionPrinter([](llvm::raw_ostream &OS) {
|
||||
OS << versionString() << "\n"
|
||||
|
|
Loading…
Reference in New Issue