RE: [PATCH/RFC v4 02/13] read-cache.c: Re-read index if index file changed
Show 17 quoted lines
> From: Thomas Gummerer [mailto:t.gummerer@gmail.com]
> Sent: Monday, August 27, 2012 11:40 AM
> To: Joachim Schmitz
> Cc: git@vger.kernel.org
> Subject: Re: [PATCH/RFC v4 02/13] read-cache.c: Re-read index if index file changed
>
> On 08/25, Joachim Schmitz wrote:
> > "Thomas Gummerer" <t.gummerer@gmail.com> schrieb im Newsbeitrag news:<1345111129-6925-3-git-send-email-
> t.gummerer@gmail.com>...
> > > [...]
> > > + usleep(10*1000);
> >
> > usleep() is not available to anybody, e.g. it is not in HP NonStop (not in every case at least)
> >
> > Bye, Jojo
> >
> Thanks for noticing, will be fixed in the re-roll.
Instead of
usleep(10*1000);
You could use
poll(NULL, 0, 10);
instead, similar to what help.c is doing
This may need a fix in compat/win32/poll.c though:
diff --git a/compat/win32/poll.c b/compat/win32/poll.c
--- a/compat/win32/poll.c
+++ b/compat/win32/poll.c
@@ -350,7 +350,7 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
/* EFAULT is not necessary to implement, but let's do it in the
simplest case. */
- if (!pfd)
+ if (!pfd && nfd)
{
errno = EFAULT;
return -1;
That fix would be needed anyhow...
Bye, Jojo