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 | |
parent | 7b4c60eb7a7353110bbef38d8c979eb2c857911d (diff) |
Transport filter timeout fix. Fixes: #898
-rw-r--r-- | doc/doc-txt/ChangeLog | 5 | ||||
-rw-r--r-- | src/src/transports/pipe.c | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 8e6d5b0c4..9803382dc 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.585 2009/10/30 15:14:04 nm4 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.586 2009/11/05 19:31:15 nm4 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -142,6 +142,9 @@ NM/31 Bugzilla 896: Dovecot buffer overrun fix NM/32 Bugzilla 889: Change all instances of "expr" in shell scripts to "expr --" Unlike the original bugzilla I have changed all shell scripts in src tree +NM/33 Bugzilla 898: Transport filter timeout fix + Patch by Todd Rinaldo + Exim version 4.69 ----------------- 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 |