On 2007-11-10 13:26:08 -0800, Max Englander wrote:
> 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.

http://www.irssi.org/scripts/html/leodict.pl.html

    darix

-- 
           openSUSE - SUSE Linux is my linux
               openSUSE is good for you
                   www.opensuse.org

Reply via email to