For Programmers: Free Programming Magazines  


Home > Archive > ithreads > July 2006 > Threads under mod perl









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Threads under mod perl
Qasem Sweilem

2006-07-03, 8:04 am

Hi,



I have a problem running threads under mod perl. I always get a squid error
"zero sized reply", and several segfault errors in the apache error log as
follows:



[Mon Jul 03 15:10:45 2006] [notice] child pid 2230 exit signal Segmentation
fault (11)





It works fine in a standard CGI environment.



Notes:

I have perl 5.8.6 and Apache2.0 with mod-perl2.0.2



httpd conf:



Alias /epbin/ /home/opt/v-hosts/dev/dev2/epbin/

<Location /epbin>

SetHandler perl-script

PerlResponseHandler ModPerl::PerlRun

Options +ExecCGI

PerlOptions +ParseHeaders

PerlInitHandler Apache2::Reload

</Location>







When typing: perl -V:useithreads -V:usemultiplicity

I get: useithreads='define';

usemultiplicity='define';



Here the simple test script I am trying to run:



--------------------

use threads;



$thr = threads->new(\&sub1);

@ReturnData = $thr->join;



print "Thread returned @ReturnData \n";



sub sub1 {

return "Fifty-six", "foo", 2;

}

---------------------



Is there anything required which I missed?



Thanks in advance

Qasem




Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com