From 07ca9bce1433f41cb5317b03a6f6fcd65e571064 Mon Sep 17 00:00:00 2001 From: Zelenoviy Date: Thu, 1 Dec 2022 02:27:43 +0700 Subject: [PATCH] termios: fix raw mode initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ibdf0b84fd3ef47c091a670b1cdd00edf2cde196d Reviewed-on: https://review.haiku-os.org/c/haiku/+/5869 Reviewed-by: Jérôme Duval Reviewed-by: waddlesplash Tested-by: Commit checker robot --- src/system/libroot/posix/termios.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/libroot/posix/termios.c b/src/system/libroot/posix/termios.c index 5f559bedc9..818157975a 100644 --- a/src/system/libroot/posix/termios.c +++ b/src/system/libroot/posix/termios.c @@ -166,6 +166,8 @@ cfmakeraw(struct termios *termios) termios->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); termios->c_cflag &= ~(CSIZE | PARENB); termios->c_cflag |= CS8; + termios->c_cc[VMIN] = 1; // input is available character by character + termios->c_cc[VTIME] = 0; }