On Mon, Feb 08, 2016 at 04:23:55PM +0000, Christos Zoulas wrote:
> >[...]
> >Does it do so if the file descriptor's error is EAGAIN ?
> >If so that's no very usefull ...
> 
> I don't think it does. If the file descriptor is revoked I believe it
> returns EIO. The question is that if the read code sees an error (EAGAIN),
> why does it retry? Is it because it expects to get a "full message" and it
> does not? Does it get any bytes?

it doens't get any bytes. i.e. poll said there was something to read but
there is not.
It does retry because the same code is used after the pipe has been closed
(the child exited or has been killed) in this case it's OK to wait for
data or EOF which will happen very soon.

-- 
Manuel Bouyer <[email protected]>
     NetBSD: 26 ans d'experience feront toujours la difference
--

Reply via email to