1 |
Hi, |
2 |
|
3 |
On Wed, 3 May 2006 20:38:49 +0100 (WEST) |
4 |
Jorge Almeida <jalmeida@××××××××××××.pt> wrote: |
5 |
|
6 |
> On Wed, 3 May 2006, Boyd Stephen Smith Jr. wrote: |
7 |
> |
8 |
> > Putting something in the background doesn't change what it's std(in|out| |
9 |
> > err) are attached to. They will still go to the [pt]ty like normal. If |
10 |
> Right, my mistake. Still, the parent script will exit sucessfuly, and |
11 |
> then how can the backgrounded process be controlled, other than by |
12 |
> killing it with kill -TERM or something like that? |
13 |
|
14 |
Signals are the only way (or you have a "parent died" logic inside the |
15 |
child process). And this will always open a racing condition when |
16 |
relying on shell scripting, like I showed in my earlier answer. But for |
17 |
multilog this won't matter as stdin/stdout is dup'ed to the child. It |
18 |
does matter, though, for security holes. |
19 |
|
20 |
> > you *want* then redirected somewhere else, you are free to do so with |
21 |
> > standard redirection operations before the ampersand. |
22 |
> I don't want redirection. Multilog will grasp stdout, but only of the |
23 |
> parent process (I think); once the latter exits, I don't think the other |
24 |
> process will be accessible. |
25 |
|
26 |
It doesn't exit. It's just a shell built-in "wait" (no, in fact, it is |
27 |
a glibc built-in "wait"). The file handles are kind of dup'ed, so |
28 |
multilog should work just fine. |
29 |
|
30 |
-hwh |
31 |
-- |
32 |
gentoo-user@g.o mailing list |