From b9461fcfb3564f8a708a9daafda98273a16bf4d1 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Fri, 8 Jan 1999 06:37:22 +0000 Subject: DeliverToList(): Ignore ECHILD exceptions that have been reported on Linux systems when we close the cmdproc pipe. We could be masking a real bug, but I can't figure it out, and it seems harmless. --- Mailman/Deliverer.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Mailman') diff --git a/Mailman/Deliverer.py b/Mailman/Deliverer.py index 754374db8..f01142844 100644 --- a/Mailman/Deliverer.py +++ b/Mailman/Deliverer.py @@ -20,6 +20,7 @@ import string, os, sys import operator +import errno import mm_cfg import Errors import Utils @@ -169,7 +170,22 @@ class Deliverer: if footer: cmdproc.write(footer) - status = cmdproc.close() + # TBD: this potentially masks a real bug. We have been getting + # several reports from Linux users that this line is raising the + # following exception: + # + # IOError: (10, 'No child processes') + # + # I don't know how this can happen, I can't reproduce it on Solaris, + # and it doesn't seem to affect anything. So I'm chalking it up to a + # harmless Linux artifact that we can safely ignore. + try: + status = cmdproc.close() + except IOError, (code, msg): + if errcode <> errno.ECHILD: + Utils.reraise() + # otherwise just ignore it + status = 0 if status: self.LogMsg('deliverer', 'Non-zero exit status: %d\nCommand: %s', -- cgit v1.2.3-70-g09d2