Commit 32626284 authored by 's avatar

merged requestCloseOnExec fixes to listening sockets

parent 481f123f
......@@ -707,6 +707,9 @@ class FCGIServer(asyncore.dispatcher):
def writable (self):
return 0
def create_socket(self, family, type):
asyncore.dispatcher.create_socket(self, family, type)
requestCloseOnExec(self.socket)
def listen(self, num):
# override asyncore limits for nt's listen queue size
......
......@@ -658,7 +658,11 @@ class FTPServer(ftp_server):
def log_info(self, message, type='info'):
if self.shutup: return
asyncore.dispatcher.log_info(self, message, type)
def create_socket(self, family, type):
asyncore.dispatcher.create_socket(self, family, type)
requestCloseOnExec(self.socket)
def handle_accept (self):
conn, addr = self.accept()
self.total_sessions.increment()
......
......@@ -401,6 +401,10 @@ class zhttp_server(http_server):
if self.shutup: return
dispatcher.log_info(self, message, type)
def create_socket(self, family, type):
dispatcher.create_socket(self, family, type)
requestCloseOnExec(self.socket)
def readable(self):
return self.accepting and \
len(asyncore.socket_map) < CONNECTION_LIMIT
......
......@@ -343,6 +343,9 @@ class PCGIServer(asyncore.dispatcher):
)
self.listen(256)
def create_socket(self, family, type):
asyncore.dispatcher.create_socket(self, family, type)
requestCloseOnExec(self.socket)
def read_info(self,info_file):
"read configuration information from a PCGI info file"
......
......@@ -707,6 +707,9 @@ class FCGIServer(asyncore.dispatcher):
def writable (self):
return 0
def create_socket(self, family, type):
asyncore.dispatcher.create_socket(self, family, type)
requestCloseOnExec(self.socket)
def listen(self, num):
# override asyncore limits for nt's listen queue size
......
......@@ -658,7 +658,11 @@ class FTPServer(ftp_server):
def log_info(self, message, type='info'):
if self.shutup: return
asyncore.dispatcher.log_info(self, message, type)
def create_socket(self, family, type):
asyncore.dispatcher.create_socket(self, family, type)
requestCloseOnExec(self.socket)
def handle_accept (self):
conn, addr = self.accept()
self.total_sessions.increment()
......
......@@ -401,6 +401,10 @@ class zhttp_server(http_server):
if self.shutup: return
dispatcher.log_info(self, message, type)
def create_socket(self, family, type):
dispatcher.create_socket(self, family, type)
requestCloseOnExec(self.socket)
def readable(self):
return self.accepting and \
len(asyncore.socket_map) < CONNECTION_LIMIT
......
......@@ -343,6 +343,9 @@ class PCGIServer(asyncore.dispatcher):
)
self.listen(256)
def create_socket(self, family, type):
asyncore.dispatcher.create_socket(self, family, type)
requestCloseOnExec(self.socket)
def read_info(self,info_file):
"read configuration information from a PCGI info file"
......
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