in reply to Re: daemon/fork: defunct parent not going away nicely
in thread daemon/fork: defunct parent not going away nicely
I would speculate that crond is waiting for one for more of the STDIN/STDOUT/STDRR...
That's right. crond is generally attempting to read output from the jobs it started, which it would then typically try to mail somewhere. (This is kind of like if you were to run your script using backticks from another Perl script (or the shell, unless it auto-reaps) — which would produce the exact same behavior of leaving a zombie behind.)
As the (grand)child process inherits the standard file handles, they're not being closed when the parent part of your script exits, i.e. the child's duplicates remain open.
The solution is to close those handles, or more properly, do as described in perlipc.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: daemon/fork: defunct parent not going away nicely
by Cagao (Monk) on Oct 14, 2011 at 13:26 UTC |