On 2017-09-02, at 13:07, Alan Altmark wrote:

> Any read() that returns a value of zero indicates eof on a file or that your 
> peer has closed their end of the channel and no further data will be received.
> 
> This is true of both blocking and non-blocking sockets.
>  
For a non-blocking descriptor that's not a socket, if no data are ready
an empty buffer is returned and EAGAIN is set telling the programmer to
try again sooner or later.  I'd be surprised if socket descriptors behave
differently, but I haven't tried it.

What does the FILEDESCRIPTOR stage do when no data are ready, at least on
a non-blocking descriptor.

-- gil

Reply via email to