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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marco Costalba
Date: Saturday, December 9, 2006 - 10:51 am

On 12/9/06, Alex Riesen <fork0@t-online.de> wrote:

By 'start' I mean it is done inside Qt QProcess class back box ;-)

Anyway I have written an homegrown 'wanna be hacker' launching script:

git rev-list --header --boundary --parents --topo-order HEAD >
/tmp/qgit_136224752.txt &
echo $!
wait


With this I can get the pid of git-rev-list from my QProcess interface
so to be able to kill it when needed with another command ('kill'
BTW).

I have googled around and it seems that 'echo $!' and 'wait' _should_
be portable among many shell, please correct me if'm wrong or if the
approach is failing (I already know it's ugly ;-)  )

  Marco
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Easy shell question: how to make a script killing all ..., Marco Costalba, (Sat Dec 9, 10:51 am)