summaryrefslogtreecommitdiffstats
path: root/Lib/socketserver.py
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2011-05-24 16:23:15 (GMT)
committerCharles-François Natali <neologix@free.fr>2011-05-24 16:23:15 (GMT)
commit7b54e7562d44826947d2e5167dcfdc7b91a7f181 (patch)
tree848363832c6a95aaaa76ff3b24ffaf7ce73de46b /Lib/socketserver.py
parent7963a35b417dfde5d97c52c05b73af738c827ca6 (diff)
downloadcpython-7b54e7562d44826947d2e5167dcfdc7b91a7f181.zip
cpython-7b54e7562d44826947d2e5167dcfdc7b91a7f181.tar.gz
cpython-7b54e7562d44826947d2e5167dcfdc7b91a7f181.tar.bz2
Issue #5715: In socketserver, close the server socket in the child process.
Diffstat (limited to 'Lib/socketserver.py')
-rw-r--r--Lib/socketserver.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/socketserver.py b/Lib/socketserver.py
index 3d32c3e..76ac50a 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)