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

Re: [PATCH] pager: fix crash when pager program doesn't exist

From
Enzo Matsumiya <ematsumiya@suse.de>
Date
Nov 20, 2021, 03:06 UTC
Message-ID
<20211120030621.2xbcz5usaqkh2ald@cyberdelia>
In-Reply-To
<20211120023246.7ynehp5v3iypfr6w@cyberdelia>
On 11/19, Enzo Matsumiya wrote:
Show 6 quoted lines
>>When pager setup succeeds, the second run is a noop, because isatty(1)
>>is no longer true. But for the case you're interested in, the first one
>>fails, so we do try again. And I can reproduce your problem with:
>
>No, it's not a noop such as that it's clear that things are different on
>the second call.
Here I meant that setup_pager() is effectivelly called from 2 different places:

First backtrace: setup_pager() commit_pager_choice() run_builtin() handle_builtin() run_argv() cmd_main()

Second backtrace: setup_pager() cmd_log_init_finish() cmd_log_init() cmd_show() run_builtin() handle_builtin() run_argv() cmd_main()

Also, isatty(1) is not false in neither of the calls. Otherwise I wouldn't hit this bug (pager would be NULL and setup_pager() a noop as you said).

Cheers,
Enzo
Previous: Enzo MatsumiyaNext: Jeff King
Message 4 of 6 in “pager: fix crash when pager program doesn't exist”
  1. pager: fix crash when pager program doesn't existEnzo Matsumiya, Nov 19, 2021
  2. Jeff KingNov 20, 2021
  3. Enzo MatsumiyaNov 20, 2021
  4. Enzo MatsumiyaNov 20, 2021
  5. Jeff KingNov 20, 2021
  6. Jeff KingNov 20, 2021

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.