summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces
diff options
context:
space:
mode:
authorBarry Warsaw2017-01-28 13:17:25 -0500
committerBarry Warsaw2017-01-28 13:19:58 -0500
commit7c97e8fbdb90a1a0de1526d7a6f108e95415d6a0 (patch)
treed49c10cccf7bfafa08fa7145a5860fa43e5615fb /src/mailman/interfaces
parentdfb807e04037786a62e7635d0b37e0695a77d5d6 (diff)
downloadmailman-7c97e8fbdb90a1a0de1526d7a6f108e95415d6a0.tar.gz
mailman-7c97e8fbdb90a1a0de1526d7a6f108e95415d6a0.tar.zst
mailman-7c97e8fbdb90a1a0de1526d7a6f108e95415d6a0.zip
Diffstat (limited to 'src/mailman/interfaces')
-rw-r--r--src/mailman/interfaces/runner.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mailman/interfaces/runner.py b/src/mailman/interfaces/runner.py
index 12a7e49ad..f85c759c1 100644
--- a/src/mailman/interfaces/runner.py
+++ b/src/mailman/interfaces/runner.py
@@ -34,6 +34,19 @@ class RunnerCrashEvent:
@public
+class RunnerInterrupt(Exception):
+ """A runner received a system call interrupting signal.
+
+ PEP 475 automatically, and at the C layer, retries system calls such as
+ time.sleep(). This can mean runners with long sleeps in their _snooze()
+ method won't actually exit. This exception is always raised in Mailman's
+ runner signal handlers to prevent this behavior. Runners that implement
+ their own .run() method must be prepared to handle this, usually by
+ ignoring it.
+ """
+
+
+@public
class IRunner(Interface):
"""The runner."""