Zombies from forked thread process. Why?
andymac at bullseye.apana.org.au
Thu Aug 16 01:30:25 CEST 2001
On Wed, 15 Aug 2001, Dave Cinege wrote:
> I have a daemon process that watches a directory for files. When
> some appear it decides what to do with them and then spawns a
> processor to handle them. To be speedy it detaches (forks) a processor
> for each 'section'. Eveything run perfect, except that when the processor
> process returns it leaves a zombie in the process tree:
> root 29065 0.0 0.0 0 0 ? Z 11:40 0:00 [mss_snort-updat <defunct>]
> This is only when invoked by my daemon and not directly by hand.
Your code doesn't have any waitpid() to retrieve the state of the child
when it terminates (at least what was shown didn't have any)
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au | Snail: PO Box 370
andymac at pcug.org.au | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia
More information about the Python-list