summaryrefslogtreecommitdiff
path: root/src/mailman/bin/master.py
diff options
context:
space:
mode:
authorJ08nY2017-08-07 18:36:22 +0200
committerJ08nY2017-08-07 18:36:22 +0200
commitd107fd41f03b57f7731b60bb7ba921febc3ce3b9 (patch)
treecda2a8b12804345da87c043cfa90f6bb59bd83b3 /src/mailman/bin/master.py
parent9421a6ad9c3d272fd16ece2c21d317ab48251dae (diff)
parent8addebbf9802e911c06f6a27b7ffff1e0f1d2e57 (diff)
downloadmailman-d107fd41f03b57f7731b60bb7ba921febc3ce3b9.tar.gz
mailman-d107fd41f03b57f7731b60bb7ba921febc3ce3b9.tar.zst
mailman-d107fd41f03b57f7731b60bb7ba921febc3ce3b9.zip
Diffstat (limited to 'src/mailman/bin/master.py')
-rw-r--r--src/mailman/bin/master.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mailman/bin/master.py b/src/mailman/bin/master.py
index 0b273d332..ccaa16398 100644
--- a/src/mailman/bin/master.py
+++ b/src/mailman/bin/master.py
@@ -188,6 +188,9 @@ class PIDWatcher:
def __init__(self):
self._pids = {}
+ def __contains__(self, pid):
+ return pid in self._pids.keys()
+
def __iter__(self):
# Safely iterate over all the keys in the dictionary. Because
# asynchronous signals are involved, the dictionary's size could
@@ -402,6 +405,10 @@ class Loop:
except InterruptedError: # pragma: nocover
# If the system call got interrupted, just restart it.
continue
+ if pid not in self._kids: # pragma: nocover
+ # Not a runner subprocess, maybe a plugin started one
+ # ignore it
+ continue
# Find out why the subprocess exited by getting the signal
# received or exit status.
if os.WIFSIGNALED(status):