Easy shell question: how to make a script killing all his childs when killed?
- From
- Marco 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