termios & non-blocking I/O

Andrey A. Chernov ache at nagual.pp.ru
Tue Apr 8 12:49:48 PDT 2003


On Wed, Apr 09, 2003 at 05:33:28 +1000, Bruce Evans wrote:
> The spec is not very clear, but I think it means to say to return
> -1/EAGAIN (it says that first).

POSIX says:

IEEE Std 1003.1-200x does not specify whether the setting of O_NONBLOCK
takes precedence over MIN or TIME settings. Therefore, if O_NONBLOCK is
set, read( ) may return immediately, regardless of the setting of MIN or
TIME. Also, if no data is available, read( ) may either return 0, or
return -1 with errno set to [EAGAIN].

-- 
Andrey A. Chernov
http://ache.pp.ru/


More information about the freebsd-arch mailing list