summaryrefslogtreecommitdiff
path: root/src/mailman/bin/master.py
diff options
context:
space:
mode:
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()