Click here to get back home

Callback from threaded c-library

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Callback from threaded c-library Kim Karlsson 02-21-2005
Posted by Kim Karlsson on February 21, 2005, 3:18 pm
Please log in for more thread options


Hi all,

I am using Perl 5.8.0, using Red Hat 9 with a 2.6.9 kernel on a dual-Xeon
machine,
and I shared object I need to use. This shared object has a working thread
which calls a callback when it has finished working.
I have written an extension (following the instructions (the one with the
FH) in
http://www.tfug.org/helpdesk/perl/pod/perlcall.html#Strategies_for_storing_Calback_)

in Perl to access this shared object.

The problem I have is that if the thread calls the callback (to a Perl
sub), I get a segmentation fault. If the callback is called before the
thread starts executing, it all works fine. If I use a C program to setup
the callback and have the thread call the callback, it all works. Thus it
seems there is something going wrong with Perl.
The odd thing is that it crashes -before- it enters the private C function
that calls the Perl sub.

Are there any knows issues with Perl and external threads that I don't
know about, or does anyone know what I can do ?

Cheers,
-Kim


Similar ThreadsPosted
DBIx::Threaded examples April 24, 2008, 1:21 pm
LWP::Parallel callback question January 28, 2006, 12:43 am
Net::SMTP - Unknown callback May 15, 2008, 6:45 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap