Kaydet (Commit) f5b8ea91 authored tarafından Kristján Valur Jónsson's avatar Kristján Valur Jónsson

http://bugs.python.org/issue6382

close_request() (which can send a socket.shutdown()) must be called by the child process in a forking server.  The parent must merely close the socket handle.
üst 463dc4bf
......@@ -532,17 +532,19 @@ class ForkingMixIn:
if self.active_children is None:
self.active_children = []
self.active_children.append(pid)
self.close_request(request)
request.close() #close socket handle in parent process
return
else:
# Child process.
# This must never return, hence os._exit()!
try:
self.finish_request(request, client_address)
self.close_request(request)
os._exit(0)
except:
try:
self.handle_error(request, client_address)
self.close_request(request)
finally:
os._exit(1)
......
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