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

Re: [PATCH 3/3] execv_dashed_external: wait for child on signal death

From
Jeff King <peff@peff.net>
Date
Jan 7, 2017, 07:34 UTC
Message-ID
<20170107073454.mz2pdphipv3gqvfr@sigill.intra.peff.net>
In-Reply-To
<650a25f6-5f22-8efb-3048-6afadbaa7092@kdbg.org>
On Sat, Jan 07, 2017 at 08:28:22AM +0100, Johannes Sixt wrote:
Show 9 quoted lines
> > But when you have a dashed external (or an alias pointing to
> > a builtin, which will re-exec git for the builtin), there's
> > an extra process in the mix. For instance, running:
> > 
> >   git -c alias.l=log log
> 
> This should be
> 
>   git -c alias.l=log l
Yeah, it should be.
> For the complete series:
> 
> Acked-by: Johannes Sixt <j6t@kdbg.org>
Thanks.
> What should we add to Documentation/technical/api-run-command.txt about the
> new flag? "Do not use?" "Understand the commit message of <this commit>
> before setting the flag to true?"

I think it can be explained pretty easily as "after killing all children marked for clean_on_exit, do a blocking waitpid() on any child that is also marked wait_after_clean". But I notice we do not actually document clean_on_exit, either, nor most of the options in "struct child_process".

IMHO it would be an improvement to merge the contents of the technical/api-run-command.txt documentation into the header file, and document each option with a comment above its definition. That makes it a lot easier to have the will to document any newly-added options, because if you don't they look bad next to the others. :)

Mechanics aside, I am not sure if we need a "do not use" or "here are the caveats". I think if we explain what it does, we can rely on list discussion and review to catch any obviously-stupid uses (both of it and of clean_on_exit).

-Peff
Previous: Johannes SixtNext: Duy Nguyen
Message 16 of 19 in “Regression: Ctrl-c from the pager in an alias exits it”
  1. Trygve AabergeJan 5, 2017
  2. Jeff KingJan 6, 2017
  3. Jeff KingJan 6, 2017
  4. Jeff KingJan 6, 2017
  5. Jeff KingJan 6, 2017
  6. Trygve AabergeJan 6, 2017
  7. Johannes SixtJan 6, 2017
  8. Jeff KingJan 6, 2017
  9. Johannes SixtJan 6, 2017
  10. Jeff KingJan 6, 2017
  11. 0/3 fix ^C killing pager when running aliasJeff King, Jan 7, 2017
  12. 1/3 execv_dashed_external: use child_process structJeff King, Jan 7, 2017
  13. 2/3 execv_dashed_external: stop exiting with negative codeJeff King, Jan 7, 2017
  14. 3/3 execv_dashed_external: wait for child on signal deathJeff King, Jan 7, 2017
  15. Johannes SixtJan 7, 2017
  16. Jeff KingJan 7, 2017
  17. Duy NguyenJan 7, 2017
  18. Jacob KellerJan 7, 2017
  19. Jacob KellerJan 7, 2017

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.