I used os.waitpid,but I still can't Zombie process?

张少驰 zhangsc at neusoft.com
Tue Dec 18 20:51:28 EST 2001


I still want to kill Zombie process which cause by child process,so I use os.waitpid,But I found Zombie is still exist,why? my program is follows:
...
while 1:
  ...
  ret=os.fork() 
  if ret==0: 
     HOST=udpaddr
     PORT=21567
     ADDR=(HOST,PORT)
     udpSerSock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
     udpSerSock.sendto(data,ADDR)
     udpSerSock.close()
     break
  os.waitpid(ret,os.WNOHANG);

Where is my program's error? How to correct my program? Any idea will be appreciated.
      Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20011219/ed323f3c/attachment.html>


More information about the Python-list mailing list