From d99c6105e75e58627b8c6598559e4a340e35cb46 Mon Sep 17 00:00:00 2001 From: Gabriel Baraldi Date: Wed, 26 Nov 2025 15:24:05 -0300 Subject: [PATCH] Don't drain when setting the mode --- src/unix/tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/tty.c b/src/unix/tty.c index 949f0613db6..bfd744a9922 100644 --- a/src/unix/tty.c +++ b/src/unix/tty.c @@ -52,7 +52,7 @@ */ static int isreallyatty(int file) { int rc; - + rc = !ioctl(file, TXISATTY + 0x81, NULL); if (!rc && errno != EBADF) errno = ENOTTY; @@ -334,7 +334,7 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) { } /* Apply changes after draining */ - rc = uv__tcsetattr(fd, TCSADRAIN, &tmp); + rc = uv__tcsetattr(fd, TCSANOW, &tmp); if (rc == 0) tty->mode = mode;