Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2003 23:49:44 +0400
From:      "Andrey A. Chernov" <ache@nagual.pp.ru>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Yar Tikhiy <yar@freebsd.org>
Subject:   Re: termios & non-blocking I/O
Message-ID:  <20030408194944.GA43822@nagual.pp.ru>
In-Reply-To: <20030409044301.J628@gamplex.bde.org>
References:  <20030408164614.GA7236@comp.chem.msu.su> <20030409044301.J628@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030408194944.GA43822>