On Wed, 3 May 2006, Zac Slade wrote:
On Wednesday 03 May 2006 16:04, Jorge Almeida wrote:
But I won't be able to use svc to interact with the child. That's why I
feel I must reformulate the whole setup.
If you need deeper interaction with a child process then you might need to
look outside
On Tue, 2 May 2006, Jorge Almeida wrote:
parent.sh
#!/bin/bash
do something
/path/to/child.sh
do something else
It's just bash scripting, just tell bash to exec child.sh in the
background.
/path/to/child.sh
Christopher Fisk
--
Stewie Griffin: Mother,
On Wed, 3 May 2006, Christopher Fisk wrote:
It's just bash scripting, just tell bash to exec child.sh in the background.
/path/to/child.sh
Nope. I need the child in the foreground, so that its output and stderr
goes to multilog.
Thanks,
Jorge Almeida
--
gentoo-user@gentoo.org mailing
On Wednesday 03 May 2006 11:25, Jorge Almeida [EMAIL PROTECTED]
wrote about 'Re: [gentoo-user] [OT] kill a child and suicide':
On Wed, 3 May 2006, Christopher Fisk wrote:
It's just bash scripting, just tell bash to exec child.sh in the
background.
/path/to/child.sh
Nope. I need
On Wed, 3 May 2006, Boyd Stephen Smith Jr. wrote:
Putting something in the background doesn't change what it's std(in|out|
err) are attached to. They will still go to the [pt]ty like normal. If
Right, my mistake. Still, the parent script will exit sucessfuly, and
then how can the
Hi,
On Wed, 3 May 2006 20:38:49 +0100 (WEST)
Jorge Almeida [EMAIL PROTECTED] wrote:
On Wed, 3 May 2006, Boyd Stephen Smith Jr. wrote:
Putting something in the background doesn't change what it's std(in|out|
err) are attached to. They will still go to the [pt]ty like normal. If
Right,
On Wed, 3 May 2006, Hans-Werner Hilse wrote:
Signals are the only way (or you have a parent died logic inside the
child process). And this will always open a racing condition when
But I won't be able to use svc to interact with the child. That's why I
feel I must reformulate the whole setup.
On Wednesday 03 May 2006 16:04, Jorge Almeida wrote:
On Wed, 3 May 2006, Hans-Werner Hilse wrote:
Signals are the only way (or you have a parent died logic inside the
child process). And this will always open a racing condition when
But I won't be able to use svc to interact with the child.
On Tuesday 02 May 2006 14:40, Jorge Almeida wrote:
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 part
On Tue, 2 May 2006, Etaoin Shrdlu wrote:
I think (untested) you can do something like
trap 'kill pid of child' TERM
at then beginning of parent.sh. This way, when the parent recives TERM it
in turn sends a TERM to the child. If you want the parent to terminate,
add the exit command as well:
pkill has a -g option to send a signal to a process group.
--- Vladimir
On Tue, 2006-05-02 at 14:48 +0100, Jorge Almeida wrote:
On Tue, 2 May 2006, Etaoin Shrdlu wrote:
I think (untested) you can do something like
trap 'kill pid of child' TERM
at then beginning of parent.sh. This
On Tuesday 02 May 2006 08:48, Jorge Almeida wrote:
On Tue, 2 May 2006, Etaoin Shrdlu wrote:
I think (untested) you can do something like
trap 'kill pid of child' TERM
at then beginning of parent.sh. This way, when the parent recives TERM it
in turn sends a TERM to the child. If you
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
Hi,
On Tue, 2 May 2006 17:42:26 +0100 (WEST)
Jorge Almeida [EMAIL PROTECTED] wrote:
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
On Tue, 2 May 2006, Hans-Werner Hilse wrote:
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
15 matches
Mail list logo