Re: RFC loop at EOF from client socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 10 May 2010 21:40:22 -0700
Steven Dake <sdake@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux