[gentoo-user] Re: [OT] kill a child and suicide

2006-05-04 Thread Moshe Kaminsky
* Jorge Almeida [EMAIL PROTECTED] [03/05/06 23:30]: On Wed, 3 May 2006, Moshe Kaminsky wrote: * Jorge Almeida [EMAIL PROTECTED] [03/05/06 19:30]: On Wed, 3 May 2006, Moshe Kaminsky wrote: You can use 'kill 0' to send a signal to your own process group. Something like this: #!/bin/sh

Re: [gentoo-user] Re: [OT] kill a child and suicide

2006-05-04 Thread Hans-Werner Hilse
Hi, On Thu, 4 May 2006 18:55:28 +0300 Moshe Kaminsky [EMAIL PROTECTED] wrote: Funny, I just tried the same, and it worked. It also didn't print any after (appropriately, since the sig handler includes 'exit'), and I didn't find any sleep process. Maybe it was from some different

Re: [gentoo-user] Re: [OT] kill a child and suicide

2006-05-04 Thread Willie Wong
On Thu, May 04, 2006 at 06:55:28PM +0300, Penguin Lover Moshe Kaminsky squawked: Funny, I just tried the same, and it worked. It also didn't print any after (appropriately, since the sig handler includes 'exit'), and I didn't find any sleep process. Maybe it was from some different

[gentoo-user] Re: [OT] kill a child and suicide

2006-05-04 Thread Moshe Kaminsky
* Hans-Werner Hilse [EMAIL PROTECTED] [04/05/06 21:00]: Hi, On Thu, 4 May 2006 18:55:28 +0300 Moshe Kaminsky [EMAIL PROTECTED] wrote: Funny, I just tried the same, and it worked. It also didn't print any after (appropriately, since the sig handler includes 'exit'), and I didn't find

Re: [gentoo-user] Re: [OT] kill a child and suicide

2006-05-04 Thread Jorge Almeida
On Thu, 4 May 2006, Moshe Kaminsky wrote: #!/bin/sh trap 'kill 0;exit' TERM echo before ( sleep 30; echo inside ) echo after No use. trap will wait till the running child is completed, which is not what I want (as reply of Hans-Werner). Funny, I just tried the same, and it worked. It also

[gentoo-user] Re: [OT] kill a child and suicide

2006-05-03 Thread Moshe Kaminsky
* Jorge Almeida [EMAIL PROTECTED] [02/05/06 16:00]: parent.sh #!/bin/bash do something /path/to/child.sh do something else When parent.sh receives a TERM signal, I would like child.sh to receive TERM also, and then parent.sh receive TERM. The do something else

Re: [gentoo-user] Re: [OT] kill a child and suicide

2006-05-03 Thread Jorge Almeida
On Wed, 3 May 2006, Moshe Kaminsky wrote: You can use 'kill 0' to send a signal to your own process group. Something like this: #!/bin/sh trap 'kill 0;exit' TERM echo before ( sleep 30; echo inside ) echo after No use. trap will wait till the running child is completed, which is not what I

[gentoo-user] Re: [OT] kill a child and suicide

2006-05-03 Thread Moshe Kaminsky
* Jorge Almeida [EMAIL PROTECTED] [03/05/06 19:30]: On Wed, 3 May 2006, Moshe Kaminsky wrote: You can use 'kill 0' to send a signal to your own process group. Something like this: #!/bin/sh trap 'kill 0;exit' TERM echo before ( sleep 30; echo inside ) echo after No use. trap will

Re: [gentoo-user] Re: [OT] kill a child and suicide

2006-05-03 Thread Jorge Almeida
On Wed, 3 May 2006, Moshe Kaminsky wrote: * Jorge Almeida [EMAIL PROTECTED] [03/05/06 19:30]: On Wed, 3 May 2006, Moshe Kaminsky wrote: You can use 'kill 0' to send a signal to your own process group. Something like this: #!/bin/sh trap 'kill 0;exit' TERM echo before ( sleep 30; echo inside