diff options
author | Nigel Metheringham <nigel@exim.org> | 2009-11-05 19:28:10 +0000 |
---|---|---|
committer | Nigel Metheringham <nigel@exim.org> | 2009-11-05 19:28:10 +0000 |
commit | 52383f8f7e0df85deff1cb36746908962826e966 (patch) | |
tree | 154c0badd07df27e167f7c000bbe1ade32d8f690 /src | |
parent | 7b4c60eb7a7353110bbef38d8c979eb2c857911d (diff) |
Transport filter timeout fix. Fixes: #898
Diffstat (limited to 'src')
-rw-r--r-- | src/src/transports/pipe.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/src/transports/pipe.c b/src/src/transports/pipe.c index 3021194ae..bbba305b0 100644 --- a/src/src/transports/pipe.c +++ b/src/src/transports/pipe.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/transports/pipe.c,v 1.12 2007/01/08 10:50:20 ph10 Exp $ */ +/* $Cambridge: exim/src/src/transports/pipe.c,v 1.13 2009/11/05 19:28:10 nm4 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -924,6 +924,18 @@ if ((rc = child_close(pid, timeout)) != 0) "transport: %s%s", tblock->name, strerror(errno), tmsg); } + /* Since the transport_filter timed out we assume it has sent the child process + a malformed or incomplete data stream. Kill off the child process + and prevent checking its exit status as it will has probably exited in error. + This prevents the transport_filter timeout message from getting overwritten + by the exit error which is not the cause of the problem. */ + + else if (transport_filter_timed_out) + { + killpg(pid, SIGKILL); + kill(outpid, SIGKILL); + } + /* Either the process completed, but yielded a non-zero (necessarily positive) status, or the process was terminated by a signal (rc will contain the negation of the signal number). Treat killing by signal as failure unless |