Give a potential handleFatalSignal() time do its job
Sleep a second before exiting in case we get a fatal signal just when about to finish, which sadly seems to happen often. (In fact, if handleFatalSignal() is running at the same time, it will kill the process so we never get to the _Exit() call.)
This commit is contained in:
parent
fb0f31d2e8
commit
f7612b989a
1 changed files with 4 additions and 0 deletions
|
@ -1076,6 +1076,10 @@ void lokit_main(const std::string& childRoot,
|
|||
Log::error(std::string("Exception: ") + exc.what());
|
||||
}
|
||||
|
||||
// Sleep a second here in case we get a fatal signal just when about to finish up, which sadly
|
||||
// seems to happen often, so that the fatalSignalHandler in Util.cpp has time to produce a
|
||||
// backtrace.
|
||||
sleep(1);
|
||||
Log::info("Process finished.");
|
||||
std::_Exit(Application::EXIT_OK);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue