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, my mistake. Still, the parent script will exit sucessfuly, and
> then how can the backgrounded process be controlled, other than by
> killing it with kill -TERM or something like that?

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
relying on shell scripting, like I showed in my earlier answer. But for
multilog this won't matter as stdin/stdout is dup'ed to the child. It
does matter, though, for security holes.

> > you *want* then redirected somewhere else, you are free to do so with
> > standard redirection operations before the ampersand.
> I don't want redirection. Multilog will grasp stdout, but only of the
> parent process (I think); once the latter exits, I don't think the other
> process will be accessible.

It doesn't exit. It's just a shell built-in "wait" (no, in fact, it is
a glibc built-in "wait"). The file handles are kind of dup'ed, so
multilog should work just fine.

-hwh
-- 
gentoo-user@gentoo.org mailing list

Reply via email to