From 791469bd4fb1eba09ea8464795f100d7dd09379e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 6 Nov 2017 14:49:32 +0100 Subject: termios: Fix canonical mode In canonical mode, input is made available line by line. We must stop the canonical buffer filling upon reception of an end-of-line character. Close #3218. --- cpukit/libcsupport/src/termios.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cpukit/libcsupport/src/termios.c') diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 7a114a74b9..8303e9f18d 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/termios.c @@ -1570,8 +1570,10 @@ fillBufferQueue (struct rtems_termios_tty *tty) /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { - if (siproc (c, tty)) - wait = false; + if (siproc (c, tty)) { + /* In canonical mode, input is made available line by line */ + return; + } } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) -- cgit v1.2.3