summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2011-05-24 16:27:25 (GMT)
committerCharles-François Natali <neologix@free.fr>2011-05-24 16:27:25 (GMT)
commitcf057597e6d91c93dbb8bf63e1151d2b2da580d5 (patch)
tree9b7df6983ae4f361a61db64e676f2e6bf3d3cdf2
parent84f75c680c2a17954155e71455061599e8778ccb (diff)
parent7b54e7562d44826947d2e5167dcfdc7b91a7f181 (diff)
downloadcpython-cf057597e6d91c93dbb8bf63e1151d2b2da580d5.zip
cpython-cf057597e6d91c93dbb8bf63e1151d2b2da580d5.tar.gz
cpython-cf057597e6d91c93dbb8bf63e1151d2b2da580d5.tar.bz2
Issue #5715: In socketserver, close the server socket in the child process.
-rw-r--r--Lib/socketserver.py2
-rw-r--r--Misc/NEWS2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/socketserver.py b/Lib/socketserver.py
index 089b3ba..f42802c 100644
--- a/Lib/socketserver.py
+++ b/Lib/socketserver.py
@@ -549,10 +549,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)
self.shutdown_request(request)
diff --git a/Misc/NEWS b/Misc/NEWS
index fac8078..fc54f89 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -13,6 +13,8 @@ Core and Builtins
Library
-------
+- Issue #5715: In socketserver, close the server socket in the child process.
+
- Correct lookup of __dir__ on objects. Among other things, this causes errors
besides AttributeError found on lookup to be propagated.