mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix #245 - try to prevent leaking fds on reexec
This commit is contained in:
parent
6bac0216aa
commit
4b53236034
@ -345,6 +345,8 @@ class Arbiter(object):
|
||||
os.environ['GUNICORN_FD'] = str(self.LISTENER.fileno())
|
||||
os.chdir(self.START_CTX['cwd'])
|
||||
self.cfg.pre_exec(self)
|
||||
util.closerange(3, self.LISTENER.fileno())
|
||||
util.closerange(self.LISTENER.fileno()+1, util.get_maxfd())
|
||||
os.execvpe(self.START_CTX[0], self.START_CTX['args'], os.environ)
|
||||
|
||||
def reload(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user