I have another issue related to my module development.

My module has two components, a client and a service. The client sends commands 
and requests to AMIP (Winamp/iTunes/fb2k plugin), and certain requests receive 
responses. The service listens for unsolicited messages from AMIP, such as 
"play", "pause", etc..

Because I cannot run the service within the Irssi thread (would block normal 
Irssi usage), I have to decouple the service from Irssi somehow. I have begun 
development using libpthread, but this creates a problem. Irssi is not linked, 
nor provides the option to link, with libpthread. When Irssi calls dlclose() on 
my module, it segfaults. This occurs because of (perhaps) a bug in dlclose() 
which creates an error when a non-pthread-linked parent unloads a 
pthread-linked module. I was able to create a fix for this by linking Irssi 
with libpthread.

I have a few questions about this fix, and other possible non-threaded 
solutions.
* Will linking Irssi with libpthread create other issues in Irssi?
* Could Irssi distribute with a --with-pthreads option to allow for pthreaded 
modules?
* If I loaded my module from perl (build an Xs module), would this circumvent 
the dlclose() problem or simply move the point of fault to a different location 
(seeing as the perl interpreter is loaded in Irssi as a module, if I'm not 
mistaken) ?
* Would using perl threads allow me to safely and efficiently decouple the 
service from Irssi?

Any other ideas on how to efficiently decouple my service (fork, exec* + 
FIFOs/sockets, etc.) would also be greatly appreciated.

Thanks,
Max

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to