From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Edward Thomson <ethomson@edwardthomson•com>, git@vger•kernel.org
Subject: Re: [PATCH] upload-pack: keep poll(2)'s timeout to -1
Date: Fri, 22 Aug 2014 11:19:06 -0700 [thread overview]
Message-ID: <xmqq1ts8peud.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140822154445.GA19135@peff.net> (Jeff King's message of "Fri, 22 Aug 2014 11:44:45 -0400")
Jeff King <peff@peff•net> writes:
> 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.
next prev parent reply other threads:[~2014-08-22 18:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 15:19 [PATCH] upload-pack: keep poll(2)'s timeout to -1 Edward Thomson
2014-08-22 15:44 ` Jeff King
2014-08-22 15:56 ` Junio C Hamano
2014-08-22 16:03 ` Jeff King
2014-08-22 16:27 ` Edward Thomson
2014-08-22 18:26 ` Junio C Hamano
2014-08-22 18:19 ` Junio C Hamano [this message]
2014-08-22 18:21 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq1ts8peud.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=ethomson@edwardthomson$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox