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

Easy shell question: how to make a script killing all his childs when killed?

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Dec 9, 2006, 15:16 UTC
Message-ID
<e5bfff550612090716p215167b9r2277b09c09b18894@mail.gmail.com>
Ok. I am really bad at scripting, so perhaps my question is very silly, but...
I create and run a script with the content:

git rev-list --header --boundary --parents --topo-order 2229ff5c7c > /tmp/qgit_135902672.txt

Then I kill the script while it's running, but his child (git-rev-list) continues to run in background and I would like to stop it either.

So how can I write the script to be sure that when stopped, it will kill all his childern?

Thanks Marco

P.S: I have no way to exec the script in fancy ways, I can just start
Next: Alex Riesen
Message 1 of 6 in “Easy shell question: how to make a script killing all his childs when killed?”
  1. Marco CostalbaDec 9, 2006
  2. Alex RiesenDec 9, 2006
  3. Marco CostalbaDec 9, 2006
  4. Alex RiesenDec 9, 2006
  5. Marco CostalbaDec 9, 2006
  6. Alex RiesenDec 10, 2006

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.