Gentoo Archives: gentoo-user

From: Moshe Kaminsky <kaminsky@××××××××××××.il>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: [OT] kill a child and suicide
Date: Wed, 03 May 2006 17:18:04
Message-Id: 20060503170331.GE1982@kaminsky
In Reply to: Re: [gentoo-user] Re: [OT] kill a child and suicide by Jorge Almeida
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

Replies

Subject Author
Re: [gentoo-user] Re: [OT] kill a child and suicide Jorge Almeida <jalmeida@××××××××××××.pt>