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

Re: [PATCH] run-command.c: ensure signaled hook scripts are waited upon

From
Jeff King <peff@peff.net>
Date
Feb 21, 2020, 06:39 UTC
Message-ID
<20200221063954.GJ1280313@coredump.intra.peff.net>
In-Reply-To
<20200221060636.4507-1-asottile@umich.edu>
On Thu, Feb 20, 2020 at 10:06:36PM -0800, Anthony Sottile wrote:
> In the event of a `^C` while hook scripts are running, ensure that the
> hook processes are cleaned up and do not become zombies.  This also ensures
> that upon `^C` execution is not handed back to the terminal until the
> processes have been waited upon.

If we assume that most people would prefer this "wait until the hook has died" behavior, I think this shouldn't have any unwanted secondary effects. I'm on the fence on whether it's what most people would want or not (I guess most people don't care either way, because their scripts don't ignore SIGINT).

(Earlier in the thread, we discussed possibly swapping the order of the cleanup code and dropping the signal handler, which could have more unexpected effects, but that part isn't in this patch).

-Peff
Previous: Anthony SottileNext: Junio C Hamano
Message 2 of 3 in “run-command.c: ensure signaled hook scripts are waited upon”
  1. run-command.c: ensure signaled hook scripts are waited uponAnthony Sottile, Feb 21, 2020
  2. Jeff KingFeb 21, 2020
  3. Junio C HamanoFeb 22, 2020

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.