On Tue, 2 May 2006, Zac Slade wrote:
You can find the PID of the last backgrouned process using the bash variable $!
The child is not backgrounded!
So something like: subprocess & $pid=$! Using trap along with maybe setting alarms should get you what you want.
Based on the suggestions of Uwe and Vladimir, I tried trap 'pkill -TERM -P $$; kill -s TERM $$' TERM <do something> . /path/to/child.sh <do something else> Doesn't work, yet. Note that child.sh is a shell script that may execute some other command (like rsync), so the "." by itself may not be enough. Thanks everyone. Jorge -- gentoo-user@gentoo.org mailing list