Keep It Simple, Stupid | |
PerlMonks |
Re: problems with forkby perigeeV (Hermit) |
on May 15, 2002 at 10:33 UTC ( [id://166682]=note: print w/replies, xml ) | Need Help?? |
Your getstore is being executed by the parent. fork returns the PID to the parent, so the truth result of your if conditional means you are in the parent. A return value of 0 means you're inside the child. Also check a return of undef to make sure fork didn't puke.
In Section
Seekers of Perl Wisdom
|
|