diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2017-09-06 08:16:59 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2017-11-25 09:37:00 +0100 |
commit | 85bc6630c0a8259c713383c8787e65f92e24e600 (patch) | |
tree | 9ee249d6ecff439c1e35d56267b3598343a4fe54 /src/nvim/os_unix.c | |
parent | 9acd7bfe25b5ea2b31ffbbdbd201f5f09afc4237 (diff) | |
download | rneovim-85bc6630c0a8259c713383c8787e65f92e24e600.tar.gz rneovim-85bc6630c0a8259c713383c8787e65f92e24e600.tar.bz2 rneovim-85bc6630c0a8259c713383c8787e65f92e24e600.zip |
input: only change mode of input fd if there is an input fd
Diffstat (limited to 'src/nvim/os_unix.c')
-rw-r--r-- | src/nvim/os_unix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 692bcc97f4..d7ba675b68 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -144,7 +144,9 @@ void mch_exit(int r) FUNC_ATTR_NORETURN if (!event_teardown() && r == 0) { r = 1; // Exit with error if main_loop did not teardown gracefully. } - stream_set_blocking(input_global_fd(), true); // normalize stream (#2598) + if (input_global_fd() >= 0) { + stream_set_blocking(input_global_fd(), true); // normalize stream (#2598) + } #ifdef EXITFREE free_all_mem(); |