On onsdag, jan 29, 2003, at 10:26 Europe/Stockholm, Victor A. Prylipko wrote:
Hi, All ! Is ot possible to use threads and LWP modules together ?I tried to run simple programm: =================================================== #!/usr/bin/perl5 use LWP::UserAgent; use threads; my $ua = LWP::UserAgent->new; $req = HTTP::Request->new(GET => 'http://www.liniya.ru/robots.txt'); $res = $ua->request($req); print $res->as_string; $thr = threads->new(\&sub1, "Param 1"); $thr->join; sub sub1 { my (@InboundParameters) = @_; print "In the thread\n"; print "got parameters >", join("<>", @InboundParameters), "<\n"; }; =================================================== Result is unexpected: =================================================== HTTP/1.1 200 OK Connection: close Date: Wed, 29 Jan 2003 09:17:45 GMT Server: Apache/1.3.27 (Unix) PHP/4.1.2 mod_ssl/2.8.12 OpenSSL/0.9.6e Content-Type: text/html; charset=windows-1251 Client-Date: Wed, 29 Jan 2003 09:17:45 GMT Client-Peer: 195.34.31.254:80 Client-Response-Num: 1 Client-Transfer-Encoding: chunked User-Agent: * Disallow: /Cat/E/ Disallow: /Domen/ Bizarre SvTYPE [32] at ./ctest2 line 9. Segmentation fault (core dumped) ===================================================
Hi, do you think you can provide a stack trace for the segfault? Arthur
