From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pete Zaitcev Subject: Re: RFC loop at EOF from client socket Date: Mon, 10 May 2010 22:49:57 -0600 Message-ID: <20100510224957.568b524c@redhat.com> References: <20100510221656.6464e8dd@redhat.com> <1273552822.2576.25.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1273552822.2576.25.camel@localhost.localdomain> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: sdake@redhat.com Cc: Project Hail List On Mon, 10 May 2010 21:40:22 -0700 Steven Dake wrote: > According to Posix specifications - return from read of 0 indicates EOF; > doesn't matter on socket options. If O_NONBLOCK is set and the read > would block, result is -1 / errno=EAGAIN (or number of bytes read, or 0 > = EOF). There is no condition in which O_NONBLOCK should have any > effect on read returning the value 0 to indicate an EOF. Great, thanks for confirming this for me. This is what I assumed for the patch, but I was afraid of rumor-based engineering. > YMMV with BSD platforms, they have some non-compliant return values > around poll when EOF occurs if I recall correctly. That would be unfortunate, but we can let Jeff test it :-) -- Pete