We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 427eb2b commit 8bb7bfdCopy full SHA for 8bb7bfd
supervisor/options.py
@@ -1343,12 +1343,14 @@ def waitpid(self):
1343
# left zombies laying around.
1344
try:
1345
pid, sts = os.waitpid(-1, os.WNOHANG)
1346
- except OSError as why:
1347
- err = why.args[0]
1348
- if err not in (errno.ECHILD, errno.EINTR):
+ except OSError as exc:
+ code = exc.args[0]
+ if code not in (errno.ECHILD, errno.EINTR):
1349
self.logger.critical(
1350
- 'waitpid error; a process may not be cleaned up properly')
1351
- if err == errno.EINTR:
+ 'waitpid error %r; '
+ 'a process may not be cleaned up properly' % code
1352
+ )
1353
+ if code == errno.EINTR:
1354
self.logger.blather('EINTR during reap')
1355
pid, sts = None, None
1356
return pid, sts
0 commit comments