Thread (14 messages) flat view 14 messages, 3 authors, 2016-06-15

Re: poll() emulation in git

From: Paolo Bonzini <hidden>
Date: 2016-06-15 22:54:38

Il 06/09/2012 16:44, Joachim Schmitz ha scritto:
quoted
quoted
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)".

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help