From 4b985dd60a8d320982052260fa877d3820a6836a Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 21 Mar 2014 10:42:12 +0100 Subject: [PATCH] termios.3: Fix error in discussion of MIN > 0, TIME == 0 noncanonical mode As reported by Peter Hurley, for the MIN > 0, TIME == 0 case: read() may unblock when MIN bytes are available but return up to the 'count' parameter if more input arrives in between waking and copying into the user buffer. ... read() may also _not_ return until MIN bytes have been received, even if 'count' bytes have been received. MTK: verified the above by experiment. Reported-by: Peter Hurley Signed-off-by: Michael Kerrisk --- man3/termios.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man3/termios.3 b/man3/termios.3 index b069ec086..f45b4e675 100644 --- a/man3/termios.3 +++ b/man3/termios.3 @@ -736,8 +736,8 @@ returns 0. .TP MIN > 0; TIME == 0: .BR read (2) -blocks until the lesser of MIN bytes or the number of bytes requested -are available, and returns the lesser of these two values. +blocks until MIN bytes are available, +and returns up to the number of bytes requested. .TP MIN == 0; TIME > 0: TIME specifies the limit for a timer in tenths of a second.