RE: poll() emulation in git

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

 



> From: Paolo Bonzini [mailto:paolo.bonzini@xxxxxxxxx] On Behalf Of Paolo Bonzini
> Sent: Thursday, September 06, 2012 5:15 PM
> To: Joachim Schmitz
> Cc: git@xxxxxxxxxxxxxxx; 'Junio C Hamano'; 'Erik Faye-Lund'; bug-gnulib@xxxxxxx; rsbecker@xxxxxxxxxxxxx
> Subject: Re: poll() emulation in git
> 
> Il 06/09/2012 16:44, Joachim Schmitz ha scritto:
> >> > Yes, it's an usleep(autocorrect * 100000) basically (poll takes
> >> > milliseconds, not micro).
> > OK, it is _supposed_ to do this usleep(), but is does not, as poll() returns early with EFAULT in this case:
> >   /* EFAULT is not necessary to implement, but let's do it in the
> >      simplest case. */
> >   if (!pfd)
> >     {
> >       errno = EFAULT;
> >       return -1;
> >     }
> >
> > poll() is doing this before calling select(), so won't sleep.
> > So there's a bug in {gnulib|git}'s poll(), right?
> >
> 
> Yes, it should be "if (!pfd && nfd)".

Are you going to fix this in gnulib?

Bye, Jojo

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]