aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os_unix.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-11-02 16:37:31 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-11-02 16:47:50 -0300
commit75a5674cd2d0921400d2d2c7a9ce9701c58c5b25 (patch)
tree0d92e2b6dfc6bc721ffbd4afcde29081b3eef156 /src/nvim/os_unix.c
parenta1dd70b1d0e9ef155c81eeb249f137e763482d10 (diff)
downloadrneovim-75a5674cd2d0921400d2d2c7a9ce9701c58c5b25.tar.gz
rneovim-75a5674cd2d0921400d2d2c7a9ce9701c58c5b25.tar.bz2
rneovim-75a5674cd2d0921400d2d2c7a9ce9701c58c5b25.zip
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.
Diffstat (limited to 'src/nvim/os_unix.c')
-rw-r--r--src/nvim/os_unix.c4
1 files changed, 1 insertions, 3 deletions
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();