[exim-dev] 4.51 Transport Filter Timeout patch

Pàgina inicial
Delete this message
Reply to this message
Autor: Ben M. Thomas
Data:  
A: exim-dev
Assumpte: [exim-dev] 4.51 Transport Filter Timeout patch
The recent patch to correct the timeout issue with spamd does not work
as expected. Since the transport filter has timed out, it sends a
malformed or incomplete data stream. This patch kills of the child
process and prevents checking of its exit status. This should prevent
the transport filter timeout message from getting overwritten by the
child's exit error.
--
Ben M. Thomas <ben@???>
cPanel Inc.
diff -ru exim-4.51.orig/src/transports/pipe.c exim-4.51/src/transports/pipe.c
--- exim-4.51.orig/src/transports/pipe.c    Wed May  4 07:35:39 2005
+++ exim-4.51/src/transports/pipe.c    Wed May  4 13:38:29 2005
@@ -853,6 +853,18 @@
       "transport: %s", tblock->name, strerror(errno));
     }


+  /* 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