[milters] Archive

Lists Index Date Thread Search

Article: 1474
From: Anthony Howe
Date: 2007-03-03 09:36:34 -0500
Subject: Re: Milter-cli and hanging proces PIPE

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Jeroen Hendriks wrote:
> It looks like the PIPE used to connect to the external process isn't closed 
> after that process exits. This causes milter-cli hitting the open file limit 
> (1024) after about 512 e-mails. (using both the envelope and content 
> filters).
> I am using milter-cli 0.14.38 (using libsnert 1.63.892) and sendmail 8.14.0
> 
> It looks like it that in the function cmdStop a (void) 
> close(data->childOut[0]); is missing.

The childOut[0] converted into a buffered file in cmdStart() and is 
closed via the fclose() on line 452 in cmdStop().

	if (data->toChild != NULL && fclose(data->toChild)) {

If there is a problem it's probably the fclose() trying to flush the 
output to the CLI process and blocking.

Having implemented this CLI code else where without the buffers I/O, I 
think I'll convert milter-cli to use the same unbuffered model, which 
gives a bit more control.

> I have attached a patch that solves the problem.

The MLM is configured not to accept attachments.

-- 
Anthony C Howe          Skype: SirWumpus                    SnertSoft
+33 6 11 89 73 78         AIM: SirWumpus    Sendmail Milter Solutions
http://www.snert.com/     ICQ: 7116561
     http://www.snertsoft.com/

Lists Index Date Thread Search