Thread (6 messages) flat view 6 messages, 2 authors, 2016-08-11

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

From: Marco Costalba <hidden>
Date: 2016-08-11 19:44:06

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help