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

Re: [PATCH] start_command: reset disposition of all signals in child

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 11, 2023, 22:20 UTC
Message-ID
<xmqqa5tstkqv.fsf@gitster.g>
In-Reply-To
<c64cd85f-f14c-46b7-a0d3-b8e0bfc60053@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
> 	Preserve the set of ignored signals so that running git via a
> 	wrapper like nohup works as the user expects
OK.
Show 7 quoted lines
> The other thing is that we have some instances where we ignore SIGPIPE
> before calling start_command() which means we're ignoring it in the
> child process as well. For example in gpg-interface.c we have
> ...
> rev-list does not check for errors when writing to stdout unless
> GIT_FLUSH is set in the environment so if parent process exits early
> rev-list will keep going until it thinks it has printed everything.
Ahh, yeah, that is bad.  Thanks for pointing them out.
> I think adding a flag to struct child_process to ignore SIGPIPE in the
> parent is probably the best way to avoid problems like this.

OK. SIGPIPE is special enough that it may deserve to be singled out. A pager reading from us quitting does not have to be "we wanted to write more but got an error" but just "ok, if the user does not want any more output, that is fine".

THanks.
Previous: Phillip WoodNext: Eric Wong
Message 8 of 9 in “start_command: reset disposition of all signals in child”
  1. start_command: reset disposition of all signals in childPhillip Wood via GitGitGadget, Sep 8, 2023
  2. Junio C HamanoSep 8, 2023
  3. Phillip WoodSep 8, 2023
  4. Junio C HamanoSep 8, 2023
  5. Phillip WoodSep 8, 2023
  6. Junio C HamanoSep 8, 2023
  7. Phillip WoodSep 11, 2023
  8. Junio C HamanoSep 11, 2023
  9. Eric WongSep 8, 2023

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.