mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 16:58:17 +00:00
event: Ensure the event loop has been cleaned up in event_teardown
- Add input_teardown/signal_teardown to take care of closing signal/stdin handles. - Call those functions in event_teardown, and ensure there are no active handles by entering an infinite loop when there are unclosed handles(think of this as an assertion that can't go unoticed on travis). - Move event_teardown call to the end of mch_exit. That is required because event_poll may still be called in that function.
This commit is contained in:
@@ -522,8 +522,6 @@ void mch_exit(int r)
|
||||
{
|
||||
exiting = TRUE;
|
||||
|
||||
event_teardown();
|
||||
|
||||
{
|
||||
settmode(TMODE_COOK);
|
||||
mch_restore_title(3); /* restore xterm title and icon name */
|
||||
@@ -559,7 +557,7 @@ void mch_exit(int r)
|
||||
mac_conv_cleanup();
|
||||
#endif
|
||||
|
||||
|
||||
event_teardown();
|
||||
|
||||
#ifdef EXITFREE
|
||||
free_all_mem();
|
||||
|
Reference in New Issue
Block a user