aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/misc1.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-11-26 10:18:01 +0100
committerGitHub <noreply@github.com>2017-11-26 10:18:01 +0100
commit207b7ca4bc16d52641eaa5244eef25a0dba91dbc (patch)
treea3422eceb6eeaa692a7baf7171dfa5fd81ad86b2 /src/nvim/misc1.c
parentb57d9a4ff08fc1ef8db79d422b441b792493ff4e (diff)
parent0de019b6a65c6dd5141b7e002343df3689065ce7 (diff)
downloadrneovim-207b7ca4bc16d52641eaa5244eef25a0dba91dbc.tar.gz
rneovim-207b7ca4bc16d52641eaa5244eef25a0dba91dbc.tar.bz2
rneovim-207b7ca4bc16d52641eaa5244eef25a0dba91dbc.zip
Merge pull request #6844 from bfredl/channel
channels: support buffered output and bytes sockets/stdio
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r--src/nvim/misc1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c
index 137de84953..f7ee2950ef 100644
--- a/src/nvim/misc1.c
+++ b/src/nvim/misc1.c
@@ -2622,7 +2622,10 @@ void preserve_exit(void)
// Prevent repeated calls into this method.
if (really_exiting) {
- stream_set_blocking(input_global_fd(), true); //normalize stream (#2598)
+ if (input_global_fd() >= 0) {
+ // normalize stream (#2598)
+ stream_set_blocking(input_global_fd(), true);
+ }
exit(2);
}