Re: RFC loop at EOF from client socket
Pete Zaitcev <[email protected]> Mon, 10 May 2010 22:49:57 -0600
| Newsgroups | org.kernel.vger.hail-devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 10 May 2010 21:40:22 -0700 Steven Dake <[email protected]> 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