diff options
| author | Barry Warsaw | 2009-10-15 22:18:38 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2009-10-15 22:18:38 -0400 |
| commit | d0eff3c214b4940cb30ec1152fcabf0f34f49194 (patch) | |
| tree | 77f68adab3736cb722f53858dde3199240168751 /src/mailman/bin/master.py | |
| parent | 37332636e899c023fb31384413578346086c7692 (diff) | |
| download | mailman-d0eff3c214b4940cb30ec1152fcabf0f34f49194.tar.gz mailman-d0eff3c214b4940cb30ec1152fcabf0f34f49194.tar.zst mailman-d0eff3c214b4940cb30ec1152fcabf0f34f49194.zip | |
Diffstat (limited to 'src/mailman/bin/master.py')
| -rw-r--r-- | src/mailman/bin/master.py | 12 |
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() |
