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

Re: [PATCH] upload-pack: keep poll(2)'s timeout to -1

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 22, 2014, 18:19 UTC
Message-ID
<xmqq1ts8peud.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140822154445.GA19135@peff.net>
Jeff King <peff@peff.net> writes:
Show 23 quoted lines
> On Fri, Aug 22, 2014 at 03:19:11PM +0000, Edward Thomson wrote:
>
>> Keep poll's timeout at -1 when uploadpack.keepalive = 0, instead of
>> setting it to -1000, since some pedantic old systems (eg HP-UX) and
>> the gnulib compat/poll will treat only -1 as the valid value for
>> an infinite timeout.
>
> That makes sense, and POSIX only specifies the behavior for -1 anyway.
> The patch itself looks obviously correct. Thanks.
>
> Since we're now translating the keepalive value, and since there's no
> way to set it to "0" (nor would that really have any meaning), I guess
> we could switch the internal "no keepalive" value to 0, and do:
>
>   ret = poll(pfd, pollsize, keepalive ? 1000 * keepalive : -1);
>
> which would let us avoid setting it to -1 in some other spots.  I dunno
> if that actually makes a real difference to maintainability, though.
> Either way:
>
>   Acked-by: Jeff King <peff@peff.net>
>
> -Peff
There is 1000 * wakeup in credential-cache--daemon.c, by the way.
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 8 in “upload-pack: keep poll(2)'s timeout to -1”
  1. upload-pack: keep poll(2)'s timeout to -1Edward Thomson, Aug 22, 2014
  2. Jeff KingAug 22, 2014
  3. Junio C HamanoAug 22, 2014
  4. Jeff KingAug 22, 2014
  5. Edward ThomsonAug 22, 2014
  6. Junio C HamanoAug 22, 2014
  7. Junio C HamanoAug 22, 2014
  8. Junio C HamanoAug 22, 2014

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.