summaryrefslogtreecommitdiff
path: root/src/mailman/bin/master.py
diff options
context:
space:
mode:
authorBarry Warsaw2009-10-15 23:38:41 -0400
committerBarry Warsaw2009-10-15 23:38:41 -0400
commit9bd005cfcca26b9f02b96bba5076cd9e58421e98 (patch)
tree9a0d84faaffcde9e75fe41b633107c98cbee4b49 /src/mailman/bin/master.py
parent37332636e899c023fb31384413578346086c7692 (diff)
parent27d5a243fdb2bad9e54019c2d6fc08c68bf66fc4 (diff)
downloadmailman-9bd005cfcca26b9f02b96bba5076cd9e58421e98.tar.gz
mailman-9bd005cfcca26b9f02b96bba5076cd9e58421e98.tar.zst
mailman-9bd005cfcca26b9f02b96bba5076cd9e58421e98.zip
Diffstat (limited to 'src/mailman/bin/master.py')
-rw-r--r--src/mailman/bin/master.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mailman/bin/master.py b/src/mailman/bin/master.py
index 99555d890..910bad3e6 100644
--- a/src/mailman/bin/master.py
+++ b/src/mailman/bin/master.py
@@ -400,6 +400,13 @@ class Loop:
log.debug('[%d] %s', pid, spec)
self._kids.add(pid, info)
+ def _pause(self):
+ """Sleep until a signal is received."""
+ # Sleep until a signal is received. This prevents the master from
+ # existing immediately even if there are no qrunners (as happens in
+ # the test suite).
+ signal.pause()
+
def loop(self):
"""Main loop.
@@ -407,10 +414,7 @@ class Loop:
and configured to do so.
"""
log = logging.getLogger('mailman.qrunner')
- # Sleep until a signal is received. This prevents the master from
- # existing immediately even if there are no qrunners (as happens in
- # the test suite).
- signal.pause()
+ self._pause()
while True:
try:
pid, status = os.wait()