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

Re: [PATCH 0/5] ignore SIG{INT,QUIT} when launching editor

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 2, 2012, 10:04 UTC
Message-ID
<7vboeclqh0.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20121130223943.GA27120@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 22 quoted lines
> Since this can be thought of as "act more like system(3)", I wondered
> whether the signal-ignore logic should be moved into run-command, or
> even used by default for blocking calls to run_command (which are
> basically our version of system(3)). But it is detrimental in the common
> case that the child is not taking control of the terminal, and is just
> an implementation detail (e.g., we call "git update-ref" behind the
> scenes, but the user does not know or care). If they hit ^C during such
> a run and we are ignoring SIGINT, then either:
>
>   1. we will notice the child died by signal and report an
>      error in the subprocess rather than just dying; the end result is
>      similar, but the error is unnecessarily confusing
>
>   2. we do not bother to check the child's return code (because we do
>      not care whether the child succeeded or not, like a "gc --auto");
>      we end up totally ignoring the user's request to abort the
>      operation
>
> So I do not think we care about this behavior except for launching the
> editor. And the signal-propagation behavior of 5/5 is really so weirdly
> editor-specific (because it is about behaving well whether the child
> blocks signals or not).
Nicely explained.  Very much appreciated.
Previous: Paul Fox
Message 9 of 9 in “ignore SIG{INT,QUIT} when launching editor”
  1. 0/5 ignore SIG{INT,QUIT} when launching editorJeff King, Nov 30, 2012
  2. 1/5 run-command: drop silent_exec_failure arg from wait_or_whineJeff King, Nov 30, 2012
  3. 2/5 launch_editor: refactor to use start/finish_commandJeff King, Nov 30, 2012
  4. 3/5 launch_editor: ignore terminal signals while editor has controlJeff King, Nov 30, 2012
  5. 4/5 run-command: do not warn about child death from terminalJeff King, Nov 30, 2012
  6. 5/5 launch_editor: propagate signals from editor to gitJeff King, Nov 30, 2012
  7. Krzysztof MazurDec 1, 2012
  8. Paul FoxDec 1, 2012
  9. Junio C HamanoDec 2, 2012

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.