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

parent 7963a35b
...@@ -529,10 +529,10 @@ class ForkingMixIn: ...@@ -529,10 +529,10 @@ class ForkingMixIn:
self.active_children = [] self.active_children = []
self.active_children.append(pid) self.active_children.append(pid)
self.close_request(request) self.close_request(request)
return
else: else:
# Child process. # Child process.
# This must never return, hence os._exit()! # This must never return, hence os._exit()!
self.socket.close()
try: try:
self.finish_request(request, client_address) self.finish_request(request, client_address)
os._exit(0) os._exit(0)
......
...@@ -75,6 +75,8 @@ Core and Builtins ...@@ -75,6 +75,8 @@ Core and Builtins
Library 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 - Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore
to be able to unload the module. to be able to unload the module.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment