The Python SocketServer class
For an application that uses the SocketServer class, see ipbenchd.py from the IPbench application.
The forking mixin seems to reap its children sometime after a new request is handled. You will probably see <defunct> processes around at various times.
If you interrupt serve_forever it doesn't appear to cleanup all that well, leaving the socket listening. You might see an error like
File "/usr/lib/python2.3/SocketServer.py", line 330, in __init__ self.server_bind() File "/usr/lib/python2.3/SocketServer.py", line 341, in server_bind self.socket.bind(self.server_address) File "<string>", line 1, in bind socket.error: (98, 'Address already in use')