Skip to content

Commit 7d50d61

Browse files
committed
Fix calling condition for Arbiter.log.reopen_files()
`GUNICORN_FD` is not always set in a `reexec`ed child process. Considering `Arbiter.master_pid` is set after log reopening, choose `GUNICORN_PID`.
1 parent cf55d2c commit 7d50d61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gunicorn/arbiter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def setup(self, app):
9393
self.log = self.cfg.logger_class(app.cfg)
9494

9595
# reopen files
96-
if 'GUNICORN_FD' in os.environ:
96+
if 'GUNICORN_PID' in os.environ:
9797
self.log.reopen_files()
9898

9999
self.worker_class = self.cfg.worker_class

0 commit comments

Comments
 (0)