On Wed, 3 Nov 2004, Chris Masters wrote: > OK, just to be sure - It's safe to open descriptors on > a per slave basis as long as it in filter_initialize, > filter_begin, filter, filter_end?
Sure. > It's not safe to open file descriptors in the main > body (outside of the callback functions) of the perl > filter because these are only called once and will get > closed (by subsequent slaves calling close(2) post > fork)? Correct (for embedded perl, which everyone should be using anyway.) > Equally it's also not safe to open file descriptors in > the other pre-body filter callback functions (such as > filter_sender) because it cannot be gauranteed that > the same slave will process the body (in the same way > global vars cannot be used in these)? Well, you can open file descriptors in the pre-body callbacks as long as you use them and close them in the same callback. However, if you leave a file descriptor open in filter_sender, you can't predict who will see it next. Regards, David. _______________________________________________ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

