forking tcp server.

Brian Lee senux at senux.com
Mon Jan 7 22:04:26 EST 2002


I read Programming Python 2nd and made a simple TCP server.
I use function os.waitpid() to kill zombie process and to
trace how many processes are running. (I want to limit maximum
process.) 

But I found that checking zombie process is done before
function socket.accept(). That means if there is no more
connection to the tcp server, the last zombie process can not
be deleted.

How can I clean up all zombies always? I tried to use signal
but don't know how to. Any comments, any examples? from Python
newbie...

-- 
Brian Lee <senux at senux.com> | Follow is a random fortune message.

I think that I shall never see A billboard lovely as a tree. 
Indeed, unless the billboards fall I'll never see a tree at all. 

   -- Ogden Nash 




More information about the Python-list mailing list