Re: subprocesses lifecycle
- From: Eric Pozharski <whynot@xxxxxxxxxxxxxx>
- Date: Sat, 30 Aug 2008 23:33:32 +0300
Eric Pozharski <whynot@xxxxxxxxxxxxxx> wrote:
Matthieu Imbert <breafk@xxxxxxxxxxxxxxxxxxxxx> wrote:*SKIP*
*SKIP*
Currently, when I detect the timeout, I call die "error message". the
message is displayed, but the script does not return until
subprocesses finish (this may take several minutes, depending on what
the subprocesses do).
However you say that you have a problem. I suppose you have to
investigate why your script attempts to collect zombies. It should
not unless told so.
I've thought (and read) a lot about this. I believe now, that my guess
is wrong.
There's no problem with zombies (and respectively waiting for childs).
As C.DeRykus clearly showed double fork doesn't help.
Now, I think, that B<perl> waits till pipe closes. That happens when
writer (I intentionally say 'writer' but 'child', because it can be
child of B<init> (since double fork)) intentionally closes pipe or just
terminates.
I was wrong. Again. Sorry for inconvinience.
And what surprises me most is that, as Hans Mulder discovered, lexical
filehandles are waited, globals are not. Wouldn't someone willing to dig
through source and explain why that's that way? I've checked, both of
them are B<isa> B<FileHandle>. And till they differ a lot. Errmm,..
Can I guess again?
*CUT*
--
Torvalds' goal for Linux is very simple: World Domination
.
- Follow-Ups:
- Re: subprocesses lifecycle
- From: xhoster
- Re: subprocesses lifecycle
- References:
- subprocesses lifecycle
- From: Matthieu Imbert
- Re: subprocesses lifecycle
- From: Eric Pozharski
- subprocesses lifecycle
- Prev by Date: Re: trouble writing a setuid script
- Next by Date: FAQ 7.20 Why doesn't "my($foo) = <FILE>;" work right?
- Previous by thread: Re: subprocesses lifecycle
- Next by thread: Re: subprocesses lifecycle
- Index(es):
Relevant Pages
|