From 5ee2d3c5d609d7cfee2852e0fedbe440b07a6f29 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 21 Mar 2014 11:45:42 +0100 Subject: [PATCH] termios.3: Add a note on interaction of O_NONBLOCK with noncanonical MIN/TIME POSIX leaves the behavior open. Signed-off-by: Michael Kerrisk --- man3/termios.3 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/man3/termios.3 b/man3/termios.3 index f45b4e675..59e3ac83a 100644 --- a/man3/termios.3 +++ b/man3/termios.3 @@ -761,6 +761,25 @@ MIN byte have been read, or when the interbyte timeout expires. Because the timer is started only after the initial byte becomes available, at least one byte will be read. +.PP +POSIX +.\" POSIX.1-2008 XBD 11.1.7 +does not specify whether the setting of the +.B O_NONBLOCK +file status flag takes precedence over the MIN and TIME settings. +If +.B O_NONBLOCK +is set, a +.BR read () +in noncanonical mode may return immediately, +regardless of the setting of MIN or TIME. +Furthermore, if no data is available, +POSIX permits a +.BR read () +in noncanonical mode to return either 0, or \-1 with +.I errno +set to +.BR EAGAIN . .SS Raw mode .LP .BR cfmakeraw ()