[Top][All Lists]

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

Re: [bug-gnulib] Updates to poll module

From: Bruno Haible
Subject: Re: [bug-gnulib] Updates to poll module
Date: Fri, 29 Sep 2006 14:55:28 +0200
User-agent: KMail/1.9.1

Paolo Bonzini wrote:
> How so?  Only for EAGAIN and EINTR.  If FIONREAD is supported, it will 
> return EINVAL or something like that.

You're right, sorry. I was confused by the unified diffs (prefer context

> >> +                 errno = 0;
> >>     
> >
> > What's the purpose of that? If recv() needs errro to be 0 upon entry,
> > this statement should come before the recv() call. It cannot be needed
> > for the caller, since at this point it is guaranteed that the function
> > returns with "return rc;" which is positive.
> >   
> The idea is that we return POLLHUP or POLLERR, so having poll set an 
> errno is misleading.  If a function is allowed to modify errno 
> arbitrarily (as long as it returns a positive value) I'm ok with 
> removing this line.

Sure. Most POSIX functions can modify errno even when they finally
succeed. Even malloc() can return a valid pointer and set errno to
any value, from ENOMEM to EINVAL.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]