Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Sep 2000 17:53:08 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        Peter van Dijk <peter@dataloss.net>, current@freebsd.org
Subject:   Re: FIFOs & select: what about our implementation?
Message-ID:  <Pine.BSF.4.21.0009061714230.25604-100000@besplex.bde.org>
In-Reply-To: <20000906004433.A72273@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 6 Sep 2000, Andrey A. Chernov wrote:

> Please consider that we talk not about reads but about select. 'Select' is
> used to indicate that data is available while 'read' used to read it, they

No, select on a read descriptor returns successfully when the descriptor
is "ready" to read, whatever that means.  It normally means that a read
on the descriptor would not block (even if O_NONBLOCK is not set).  Reads
of EOF satisfy this condition.  This is normally the correct behaviour.
E.g., it prevents programs reading stdin via select() loop from hanging
when stdin is a pipe with no writers.

Bruce



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0009061714230.25604-100000>