summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/HandlerAPI.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Handlers/HandlerAPI.py')
-rw-r--r--Mailman/Handlers/HandlerAPI.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Mailman/Handlers/HandlerAPI.py b/Mailman/Handlers/HandlerAPI.py
index 78ceed921..b718e5636 100644
--- a/Mailman/Handlers/HandlerAPI.py
+++ b/Mailman/Handlers/HandlerAPI.py
@@ -16,8 +16,9 @@
"""Contains all the common functionality for the msg handler API."""
-import traceback
+import os
import time
+import traceback
from Mailman import mm_cfg
from Mailman import Errors
@@ -77,7 +78,10 @@ def do_pipeline(mlist, msg, msgdata, pipeline):
mod = __import__('Mailman.Handlers.' + modname)
func = getattr(getattr(getattr(mod, 'Handlers'), modname), 'process')
try:
+ pid = os.getpid()
func(mlist, msg, msgdata)
+ # Failsafe -- a child may have leaked through.
+ if pid <> os.getpid(): os._exit(1)
except DiscardMessage:
# Throw the message away; we need do nothing else with it.
pipeline = []