aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/pty_process_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os/pty_process_unix.c')
-rw-r--r--src/nvim/os/pty_process_unix.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c
index 4a49c0b162..c5d6af0ff6 100644
--- a/src/nvim/os/pty_process_unix.c
+++ b/src/nvim/os/pty_process_unix.c
@@ -163,10 +163,15 @@ static struct termios termios_default;
/// @param tty_fd TTY file descriptor, or -1 if not in a terminal.
void pty_process_save_termios(int tty_fd)
{
- DLOG("tty_fd=%d", tty_fd);
- if (tty_fd == -1 || tcgetattr(tty_fd, &termios_default) != 0) {
+ if (tty_fd == -1) {
return;
}
+ int rv = tcgetattr(tty_fd, &termios_default);
+ if (rv != 0) {
+ ELOG("tcgetattr failed (tty_fd=%d): %s", tty_fd, strerror(errno));
+ } else {
+ DLOG("tty_fd=%d", tty_fd);
+ }
}
/// @returns zero on success, or negative error code