On Sat, Nov 10, 2001 at 03:58:04PM -0800, Marcia Magna wrote: > I have a program that needs to fork. The child process creates > values in a hash that must be seen by the parent process. > > Is there anyway to do that ?
Short answer: No. When a process fork()s, a new process is created. That means there is now a *copy* of all of the memory in the original process now in the new process. So all Perl variables are *copied* to the new process. Since the new process is using a copy, no changes in the child process can be "seen" by the parent. Long answer: Take a look at the perlipc manual page for various ways for processes to communicate with each other (including shared memory on *some* systems). It's likely that there is another way to partition or factor your problem that does not involve complex inter-process communication. Good luck. -- Garry Williams, Zvolve Systems, Inc., +1 770 551-4504 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
