git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: [PATCH/RFC v4 02/13] read-cache.c: Re-read index if index file changed

From
Joachim Schmitz <jojo@schmitz-digital.de>
Date
Sep 7, 2012, 07:22 UTC
Message-ID
<000c01cd8cc9$8cd1fea0$a675fbe0$@schmitz-digital.de>
In-Reply-To
<20120827093930.GC26470@tommy-fedora.surfnet.iacbox>
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
Previous: Thomas Gummerer
Message 3 of 3 in “Re: [PATCH/RFC v4 02/13] read-cache.c: Re-read index if index file changed”
  1. Joachim SchmitzAug 25, 2012
  2. Thomas GummererAug 27, 2012
  3. Joachim SchmitzSep 7, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.