http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4703
------- Additional Comments From [EMAIL PROTECTED] 2005-11-23 10:28 -------
(In reply to comment #6)
> This patch doesn't prevent the consumption of file handles, does it?
>
> You may want to take a look at revision 233991, bug 4518.
no, you are right. This patch doesn't close file descriptors. The problem is
always the same: the alarm signal handler doesn't perform any form of cleanup,
and 1 - file descriptors are left open and 2 - processes are not killed, 3 - nor
waited for (to terminate zombies).
The patch attached improves the signal handler by "properly" terminating the
process and waiting for it. A close to the file descriptor could be added, I
believe...
The patch on bug 4518 does almost the same.. if the DCC file descriptor has been
left open (which implies that the alarm signal handler was called and no cleanup
was performed), kill the process and clean up. The only thing which I cannot see
is a waitpid for the killed process (it may as well have been reaped by the
SIGCHLD handler) and no attempt to send a -9 if the process doesn't terminate is
perfromed (is a SIGTERM enough to terminate the 'hanged' process?).
I've used my patch on production for a while, without fd problems.. probably,
thanks to perl autoclosing them.
I'd either add a close to my patch, or a waitpid and kill('KILL' to the patch of
bug 4518, making sure the same thing is performed for pyzor.
My 2 cents..
Cheers,
Carlo
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.