Skip to content

Commit

Permalink
Fix calling condition for Arbiter.log.reopen_files()
Browse files Browse the repository at this point in the history
`GUNICORN_FD` is not always set in a `reexec`ed child process.
Considering `Arbiter.master_pid` is set after log reopening,
choose `GUNICORN_PID`.
  • Loading branch information
laggardkernel committed Jun 22, 2021
1 parent cf55d2c commit 7d50d61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gunicorn/arbiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def setup(self, app):
self.log = self.cfg.logger_class(app.cfg)

# reopen files
if 'GUNICORN_FD' in os.environ:
if 'GUNICORN_PID' in os.environ:
self.log.reopen_files()

self.worker_class = self.cfg.worker_class
Expand Down

0 comments on commit 7d50d61

Please sign in to comment.