From: Charles-François Natali Date: Tue, 24 May 2011 16:23:15 +0000 (+0200) Subject: Issue #5715: In socketserver, close the server socket in the child process. X-Git-Tag: v3.1.4rc1~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7b54e7562d44826947d2e5167dcfdc7b91a7f181;p=thirdparty%2FPython%2Fcpython.git Issue #5715: In socketserver, close the server socket in the child process. --- diff --git a/Lib/socketserver.py b/Lib/socketserver.py index 3d32c3ea1923..76ac50a619c5 100644 --- a/Lib/socketserver.py +++ b/Lib/socketserver.py @@ -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) diff --git a/Misc/NEWS b/Misc/NEWS index 37bbbc19b31b..17f933a8ac71 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -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.