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

Re: t0300-credentials: poll failed: invalid argument

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Aug 29, 2011, 17:28 UTC
Message-ID
<01E9C05C-A19D-45B0-B15D-DA6B911C11A9@silverinsanity.com>
In-Reply-To
<20110829171411.GB756@sigill.intra.peff.net>
On Aug 29, 2011, at 1:14 PM, Jeff King wrote:
Show 18 quoted lines
> On Sun, Aug 28, 2011 at 12:40:56AM -0400, Brian Gernhardt wrote:
> 
>> The only usage of poll I see in the credentials system is:
>> 
>> credentials-cache--daemon.c
>> 177:	if (poll(&pfd, 1, 1000 * wakeup) < 0) {
>> 
>> My guess is that (1000 * wakeup) is more than INT_MAX and is becoming
>> negative as the man page for poll seems to indicate that it will fail
>> if timeout < -1.
>> 
>> Does anyone familiar with the credentials daemon want to try to figure
>> out a reasonable fix?
> 
> Ugh, sorry, this is my fault. The check_expiration() function can return
> a totally bogus value before we actually get any credentials.
> 
> Does this patch fix it for you?
Yes it does!  Surprisingly enough, non-bogus parameters keeps poll from erroring with EINVAL.  Funny that.  ;-)

Many thanks, ~~ Brian

Previous: Jeff KingNext: Jeff King
Message 3 of 8 in “t0300-credentials: poll failed: invalid argument”
  1. Brian GernhardtAug 28, 2011
  2. Jeff KingAug 29, 2011
  3. Brian GernhardtAug 29, 2011
  4. Jeff KingAug 29, 2011
  5. Thomas RastSep 9, 2011
  6. Thomas RastSep 14, 2011
  7. Brian GernhardtSep 14, 2011
  8. Jeff KingSep 14, 2011

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.