We don't bite newbies here... much | |
PerlMonks |
Parallel::ForkManager and vars from the parent script - are they accessible? (or do I need inter process communication?)by isync (Hermit) |
on Aug 08, 2007 at 18:05 UTC ( [id://631358]=perlquestion: print w/replies, xml ) | Need Help?? |
isync has asked for the wisdom of the Perl Monks concerning the following question:
I need to query the wisdom of the perl monks...
I've got a script which I switched over to Parallel::ForkManager yesterday and after a flawless start I begin to see where the little troubles are. I am using a "global" hash to store some data. As long as the for loop was kept inside the script on runtime everything went normal. But as soon as I used the ForkManager, each loop is its own entity (as I understand it) and the test for exist of certain keys always fails. Is that observation true? How am I able to let a (detached/forked) sub access data from the initiating parent process/script. (Maybe its just a bug I missed and it should work out of the box...) Or is my only chance to implement a simple communication system. Any hints for that? Modules, tips?
Back to
Seekers of Perl Wisdom
|
|