In general, processes don't share memory. There are methods which may pull it off, but I prefer to stick to "threads share, processes keep private."
At fork time, the child owns its own copy of the stuff in memory. Let it work on whatever it likes. The child should serialize (save) a copy of an object to be handed back to the parent if necessary. The parent then discovers these saved object (filename, socket connect, etc.) and deserializes (loads) the copy into its own memory space.
There are a number of approaches to serialization. I suggest using Data::Dumper/eval until you're familiar with the process, then look for more efficient storage methods later.
--
[ e d @ h a l l e y . c c ]
In reply to Re: Sharing objects between processes
by halley
in thread Sharing objects between processes
by Marcello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |