Don't ask to ask, just ask | |
PerlMonks |
Re: Perl forked processes and variable sharingby LanX (Saint) |
on Feb 01, 2022 at 21:52 UTC ( [id://11141025]=note: print w/replies, xml ) | Need Help?? |
Pardon me for not looking into your code ... ... but AFAIK there shouldn't be any way that a process can change data inside another process. And that is what fork is doing, creating different processes! (however in a very efficient way by duplicating code with copy-on-write tricks, IIRC) The "identical reference" you are seeing is IMHO just an identical copy of the reference, NOT the same memory address (NB: refs are not memory addresses! ) Why don't you use proper perlipc or threads with shared data instead?
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|