From 75a5674cd2d0921400d2d2c7a9ce9701c58c5b25 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Sun, 2 Nov 2014 16:37:31 -0300 Subject: 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. --- src/nvim/os_unix.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/os_unix.c') diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 0ad15bc433..8ab61045dc 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -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(); -- cgit