]> sourceware.org Git - newlib-cygwin.git/commit
Return at most one line of input in canonical mode
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Mon, 6 Jun 2016 13:09:34 +0000 (15:09 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 6 Jun 2016 13:10:25 +0000 (15:10 +0200)
commit7239bb7b3ded5ab961dc56dc346d8ab83660ba29
tree388d442fa8e1995260eb1d2cbd922dce2f25ee41
parent97349b78701e973a2ecfebc520a92a1ab87778e0
Return at most one line of input in canonical mode

'man termios' says:
"A read(2) returns at most one line of input" in canonical mode.

On cygwin 2.5.1, read(2) returns all data in buffer if the buffer
size specified is large enough. This behaviour is correct in
noncanonical mode, but is not correct in canonical mode.

While checking this problem, I found a bug of tcflush().  tcflush()
flushes only partial data in the buffer.  The patch also fixes this bug.

The patch has also been tested against the problem reported in
https://cygwin.com/ml/cygwin/2016-05/msg00318.html.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/fhandler_tty.cc
This page took 0.02705 seconds and 5 git commands to generate.