On 09/07/2018 15:21, Peter Maydell wrote:
>>
>> However, indeed it seems to me that the logic of the patch is backwards:
>>
>> - -1/EAGAIN should retry
>>
>> - 0 should *not* retry, because it means the other side has hung up
> This seems weird, because it doesn't follow the usual pattern
> for non-blocking functions, where 0 just means "nothing was
> written" and actual error conditions like the other side having
> gone away are reported via -1 and some errno.
> 

Ah no, that's read(2).  write(2) is as you say, so the patch should
check for EAGAIN.

Paolo

Reply via email to