os.fork on linux defunct

Cameron Simpson cs at zip.com.au
Fri Jul 30 20:39:24 EDT 2010


On 30Jul2010 15:09, Ray <rui.vapps at gmail.com> wrote:
| On Jul 30, 6:03 pm, Ray <rui.va... at gmail.com> 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
| > linux, ps shows tcpdump as defunct process
| > what am I missing?
| > thanks for any help.
| 
| I think I found it. need to call os.wait()

Yep. "defunct" == "zombie". See:

  http://code.activestate.com/lists/python-list/580569/

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Talk is the bastard redheaded stepchild of email and the telephone.
        - Geoff Miller, geoffm at purplehaze.Corp.Sun.COM



More information about the Python-list mailing list