mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 08:56:29 +00:00
loop_close: Avoid infinite loop, and log it.
Avoids a hang, and also helps diagnose issues like: https://github.com/neovim/neovim/pull/6594#issuecomment-298321826
This commit is contained in:
@@ -141,7 +141,9 @@ void mch_exit(int r) FUNC_ATTR_NORETURN
|
||||
ui_flush();
|
||||
ml_close_all(true); // remove all memfiles
|
||||
|
||||
event_teardown();
|
||||
if (!event_teardown() && r == 0) {
|
||||
r = 1; // Exit with error if main_loop did not teardown gracefully.
|
||||
}
|
||||
stream_set_blocking(input_global_fd(), true); // normalize stream (#2598)
|
||||
|
||||
#ifdef EXITFREE
|
||||
|
Reference in New Issue
Block a user