[exim-cvs] cvs commit: exim/exim-src/src/transports pipe.c

Top Page
Delete this message
Reply to this message
Author: Nigel Metheringham
Date:  
To: exim-cvs
Subject: [exim-cvs] cvs commit: exim/exim-src/src/transports pipe.c
nm4 2009/11/05 19:28:10 GMT

  Modified files:
    exim-src/src/transports pipe.c 
  Log:
  Transport filter timeout fix.  Fixes: #898


  Revision  Changes    Path
  1.13      +12 -0     exim/exim-src/src/transports/pipe.c


  Index: pipe.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/transports/pipe.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- pipe.c    8 Jan 2007 10:50:20 -0000    1.12
  +++ pipe.c    5 Nov 2009 19:28:10 -0000    1.13
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/transports/pipe.c,v 1.12 2007/01/08 10:50:20 ph10 Exp $ */
  +/* $Cambridge: exim/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 @@
         "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