diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-11-02 01:20:16 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-11-02 01:20:16 +0100 |
commit | 36c0ec6dd49c8c1a57eaa0b9f9d3c44792582f37 (patch) | |
tree | 17e727b8b0186b79f6ec4b8cc3a09acde2cd16ab | |
parent | d37c2e5dc2b9394239fdf127d15ca59ebc13e3eb (diff) | |
download | rneovim-36c0ec6dd49c8c1a57eaa0b9f9d3c44792582f37.tar.gz rneovim-36c0ec6dd49c8c1a57eaa0b9f9d3c44792582f37.tar.bz2 rneovim-36c0ec6dd49c8c1a57eaa0b9f9d3c44792582f37.zip |
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
-rw-r--r-- | src/nvim/tui/tui.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index f252b00be2..5e30517c5a 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); } |