Re: os.fork on linux defunct

2010-07-30 Thread Lawrence D'Oliveiro
In message <77a879cc-94ab-4e2a-a4af-a6945a5b8...@q16g2000prf.googlegroups.com>, Ray wrote: > I think I found it. need to call os.wait() The rule on Unix/Linux systems is: “always remember to gobble your zombie children”. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.fork on linux defunct

2010-07-30 Thread Cameron Simpson
On 30Jul2010 15:09, Ray wrote: | On Jul 30, 6:03 pm, Ray wrote: | > I'm running python 2.4 on linux. I use python os.fork run tcpdump, but | > after I kill the forked process (tcpdump) in linux it shows defunct [...] | > after I call kill() it will kill tcpdump (capture will stop) but on | > linu

Re: os.fork on linux defunct

2010-07-30 Thread Ray
On Jul 30, 6:03 pm, Ray wrote: > I'm running python 2.4 on linux. I use python os.fork run tcpdump, but > after I kill the forked process (tcpdump) in linux it shows defunct > > here is the code: > > #!/usr/bin/python > import time, os > class Test: >     def fork(self): >         self.pid=os.fork