[neovim] 01/05: tui/suspend_event(): set STDIN to "blocking"
James McCoy
jamessan at debian.org
Thu Nov 3 00:37:29 UTC 2016
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch debian/sid
in repository neovim.
commit 81648183c51c3b44b80bf720bf9ab23a0e1996a3
Author: Justin M. Keyes <justinkz at gmail.com>
Date: Wed Nov 2 01:20:16 2016 +0100
tui/suspend_event(): set STDIN to "blocking"
Set STDIN to blocking on "suspend". This was missed in #2598.
See 8a782f1699e2a59a3f3e91f6d7c35a3312b82b41.
Also on "continue"/SIGCONT explicitly set STDIN back to NON-blocking.
We don't explicitly do that on *startup* (libuv does it internally),
but on "continue" it seems wise to restore libuv's expectations.
Closes #5459
---
src/nvim/tui/tui.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index f252b00..5e30517 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -611,6 +611,7 @@ static void suspend_event(void **argv)
bool enable_mouse = data->mouse_enabled;
tui_terminal_stop(ui);
data->cont_received = false;
+ stream_set_blocking(input_global_fd(), true); // normalize stream (#2598)
kill(0, SIGTSTP);
while (!data->cont_received) {
// poll the event loop until SIGCONT is received
@@ -620,6 +621,7 @@ static void suspend_event(void **argv)
if (enable_mouse) {
tui_mouse_on(ui);
}
+ stream_set_blocking(input_global_fd(), false); // libuv expects this
// resume the main thread
CONTINUE(data->bridge);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/neovim.git
More information about the pkg-vim-maintainers
mailing list