1 |
On Tue, 2 May 2006, Etaoin Shrdlu wrote: |
2 |
|
3 |
> |
4 |
> I think (untested) you can do something like |
5 |
> |
6 |
> trap 'kill <pid of child>' TERM |
7 |
> |
8 |
> at then beginning of parent.sh. This way, when the parent recives TERM it |
9 |
> in turn sends a TERM to the child. If you want the parent to terminate, |
10 |
> add the exit command as well: |
11 |
> |
12 |
> trap 'kill <pid of child>; exit 1' TERM |
13 |
> |
14 |
But how to find out the PID of child? What would be convenient is a way |
15 |
to send signals "recursively" to a process and its children. |
16 |
Maybe I'm trying to solve a problem with wrong tools... |
17 |
Thanks, |
18 |
|
19 |
Jorge Almeida |
20 |
-- |
21 |
gentoo-user@g.o mailing list |