fx has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I compiled perl, v5.6.1 built for i686-linux-thread using the CPAN module but am having problems with a program I am writing using threads.
There is one subroutine that downloads a webpage and looks for our web address. If a link to another webpage is found in the document the program starts a new thread using the subroutine to look for our address in this new page.
Pseduo code:
sub getWebPage { my $url = $_[0]; my $page = get($url); ... foreach (website link found in $page) { new Thread \&getWebPage, website; } ... }
but there are two problems
(1) the subroutines called from the newly created threads do not work
and
(2) it seg faults
Can anyone offer some advice?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Threaded recursive program seg faults
by kschwab (Vicar) on Jul 29, 2001 at 09:40 UTC | |
by fx (Pilgrim) on Jul 29, 2001 at 22:26 UTC | |
by kschwab (Vicar) on Jul 29, 2001 at 22:44 UTC | |
|
Re: Threaded recursive program seg faults
by trantor (Chaplain) on Jul 30, 2001 at 11:15 UTC |