Issue #5715: In socketserver, close the server socket in the child process.

This commit is contained in:
Charles-François Natali 2011-05-24 18:23:15 +02:00
parent 7963a35b41
commit 7b54e7562d
2 changed files with 3 additions and 1 deletions

View File

@ -529,10 +529,10 @@ class ForkingMixIn:
self.active_children = []
self.active_children.append(pid)
self.close_request(request)
return
else:
# Child process.
# This must never return, hence os._exit()!
self.socket.close()
try:
self.finish_request(request, client_address)
os._exit(0)

View File

@ -75,6 +75,8 @@ Core and Builtins
Library
-------
- Issue #5715: In socketserver, close the server socket in the child process.
- Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore
to be able to unload the module.