summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/HandlerAPI.py
diff options
context:
space:
mode:
authorbwarsaw2000-06-23 04:25:32 +0000
committerbwarsaw2000-06-23 04:25:32 +0000
commit86edb18139753c933c90b1bf99261c29651f7326 (patch)
treef917a7f289504e375a9925f41c687b17f7985c42 /Mailman/Handlers/HandlerAPI.py
parent31ce3871b87ed5e161f32ff3a4a3385d3099797a (diff)
downloadmailman-86edb18139753c933c90b1bf99261c29651f7326.tar.gz
mailman-86edb18139753c933c90b1bf99261c29651f7326.tar.zst
mailman-86edb18139753c933c90b1bf99261c29651f7326.zip
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 = []