1 |
* Jorge Almeida <jalmeida@××××××××××××.pt> [03/05/06 19:30]: |
2 |
> On Wed, 3 May 2006, Moshe Kaminsky wrote: |
3 |
> |
4 |
> >You can use 'kill 0' to send a signal to your own process group. |
5 |
> >Something like this: |
6 |
> > |
7 |
> >#!/bin/sh |
8 |
> >trap 'kill 0;exit' TERM |
9 |
> >echo "before" |
10 |
> >( sleep 30; echo inside ) |
11 |
> >echo "after" |
12 |
> > |
13 |
> No use. trap will wait till the running child is completed, which is not what |
14 |
> I want (as reply of Hans-Werner). |
15 |
|
16 |
Well, I just tried it, and it worked. |
17 |
|
18 |
Moshe |