[Mimedefang] Sharing data between slaves

David F. Skoll dfs at roaringpenguin.com
Mon Feb 23 09:07:15 EST 2004


On Mon, 23 Feb 2004, Chris Masters wrote:

> So, is there an easy way to share this handle between
> slaves (the library is thread-safe)?

Nope.

> My best candidate at present is to implement shared
> memory on the C side of the perl-xs wrapper.

You could try using the embedded Perl interpreter and initializing
the handle right in your filter function -- it would then be shared
by slaves as they fork.  But depending on what the handle is and does,
this might not (in fact, probably will not) work.

You might need to write a daemon that the Perl slaves talk to using IPC,
and have the daemon maintain a single handle.

Regards,

David.



More information about the MIMEDefang mailing list