Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: how to make LWP calls compatible with forked script

by iburrell (Chaplain)
on Sep 02, 2004 at 16:47 UTC ( #387991=note: print w/replies, xml ) Need Help??


in reply to how to make LWP calls compatible with forked script

First, you aren't using threads, you are using multiple processes.

Second, why don't you create an LWP::UserAgent in each child process. Sharing the object between the processes does not share the data. It may create problems with sharing a socket or similar. Creating the object should be cheap.

  • Comment on Re: how to make LWP calls compatible with forked script

Replies are listed 'Best First'.
Re^2: how to make LWP calls compatible with forked script
by piyush.shourie (Beadle) on Sep 03, 2004 at 06:18 UTC
    Hi,

    Firstly, I have already updated the problem description.
    Secondly, I tried creating LWP::UserAgent in each child process, but of no use. Still it crashes the Perl.
    Can you please suggest a way to handle this?

    Thanks in advance

      It might be a bug in ActivePerl. Perl on Windows does some special stuff to provide the Unix API on Windows which does things differently. For example, fork() is emulated with threads, and sockets need to be mapped to WinSock API.

      I know there were some bugs in earlier releases of ActivePerl 5.6. Make sure you have the most recent release. ActivePerl 5.8 is supposed to be better; try that if you can. Finally, what Windows version are you running? The NT-based ones (NT 4, 2000, XP) are more stable than 95, 98, ME.

        Actually I cant change the version of Perl. Got to use the ActivePerl 5.6.

        The platform is Windows 2000. One thing to note is that the same script runs fine on Solaris. Is there a way to rectify the behaviour on Windows platform?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://387991]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2023-12-11 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?