Don't call logging functions in the signal handler.

The standard logger uses locking functions which are NOT guaranteed to
be re-entrant [1], so this could (potentially) result in deadlock or a
crash.

[1] http://docs.python.org/library/logging.html Section 15.7.8.
This commit is contained in:
Evan Mezeske 2011-10-24 17:35:46 -07:00 committed by benoitc
parent b5622f874b
commit 3c1f1cb126

View File

@ -147,8 +147,6 @@ class Arbiter(object):
if len(self.SIG_QUEUE) < 5:
self.SIG_QUEUE.append(sig)
self.wakeup()
else:
self.log.warning("Dropping signal: %s", sig)
def run(self):
"Main master loop."