[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()
STINNER Victor
report at bugs.python.org
Sun May 22 16:04:29 CEST 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
I don't know if it's related, but SimpleXMLRPCServer in Python 2.7 uses fcntl(self.fileno(), fcntl.F_SETFD, flags):
class SimpleXMLRPCServer(SocketServer.TCPServer,
SimpleXMLRPCDispatcher):
...
def __init__(self, ...):
...
# [Bug #1222790] If possible, set close-on-exec flag; if a
# method spawns a subprocess, the subprocess shouldn't have
# the listening socket open.
if fcntl is not None and hasattr(fcntl, 'FD_CLOEXEC'):
flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD)
flags |= fcntl.FD_CLOEXEC
fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags)
=> see also issue #1222790.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5715>
_______________________________________
More information about the Python-bugs-list
mailing list