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

Re: [PATCH] run-command: detect finished children by closed pipe rather than waitpid

From
Stefan Beller <sbeller@google.com>
Date
Nov 11, 2015, 20:53 UTC
Message-ID
<CAGZ79kZTiGGL0t-CkeuWDfzX-pK_Lu8PZzE1sutq2jR_23B5xg@mail.gmail.com>
In-Reply-To
<5643A9A0.50105@kdbg.org>
On Wed, Nov 11, 2015 at 12:48 PM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 8 quoted lines
>>
>> So maybe that was not the right thought and we do have to special case
>> SIGTERM here?
>
>
> I wonder why task_finish() callback gets to choose a signal. The point here
> is, IIUC, when one child dies, the others must be halted, too. SIGTERM seems
> to be the only sensible choice.
SIGKILL would also do?
In case you know your children, you can also send a SIGUSR1 or SIGUSR2.

Or if you want to quit the top level program, but want to keep going with some of the children (repacking, garbage collection, networking stuff), you way want to decouple them using SIGHUP ?

So I am not convinced SIGTERM is the only true choice here. And because I have no idea which of the signals may be useful in the future, I decided to go with all of them.

Previous: Johannes SixtNext: Johannes Sixt
Message 6 of 7 in “run-command: detect finished children by closed pipe rather than waitpid”
  1. run-command: detect finished children by closed pipe rather than waitpidStefan Beller, Nov 6, 2015
  2. Torsten BögershausenNov 7, 2015
  3. Johannes SixtNov 7, 2015
  4. Stefan BellerNov 11, 2015
  5. Johannes SixtNov 11, 2015
  6. Stefan BellerNov 11, 2015
  7. Johannes SixtNov 11, 2015

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.