[Mimedefang] Sharing data between slaves

2004-02-23 Thread Chris Masters
Hi All, I'm using perl-xs to wrap a C library in my filter script. Much like a database connection, a handle (in the form of a pointer to a struct) is initialised at the start of the slave's lifecycle and passed back to C library for each mail and then freed when the slave terminates. The

Re: [Mimedefang] Sharing data between slaves

2004-02-23 Thread David F. Skoll
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

Re: [Mimedefang] Sharing data between slaves

2004-02-23 Thread Chris Masters
Thanks for your response David. So, is there an easy way to share this handle between slaves (the library is thread-safe)? Nope. Didn't think so. You might need to write a daemon that the Perl slaves talk to using IPC, and have the daemon maintain a single handle. I think the best