[Mimedefang] Filter_initialize/cleanup persistent handle in slave caveat.
Ray Ferguson
mimedefang at share-foo.com
Mon Aug 28 12:36:45 EDT 2006
I added this to the wiki faq. It seemed tricky enough to warrent passing
along.
http://www.mimedefang.org/kwiki/index.cgi?FilterCleanup
If you read the mimedefang-filter man page, you will see that filter_cleanup
is called on exit, but that is just the normal case.
A mimedefang-multiplexor slave-busy-time-out results in a term signal without
filter_cleanup.
To further complicate matters, the embedded perl note in the man page
regarding filter_initialize and the scope of handles also applies to signal
handlers. That is to say you need to add:
$SIG{"TERM"} = \&filter_cleanup ;
To filter_initialize() where you open the handles if you need to make sure
they are consistently closed on exit in filter_cleanup.
--
Ray Ferguson
More information about the MIMEDefang
mailing list