Think about Loose Coupling | |
PerlMonks |
Re^3: Eval/Fork lesson of the dayby Minok (Novice) |
on Sep 14, 2016 at 01:27 UTC ( [id://1171706]=note: print w/replies, xml ) | Need Help?? |
So there is some side effect / memory sharing magic going on when the fork is inside an eval, clearly. Things work well when I'm running a loop over some cases and just fork (and have the forked children self monitor and die with error or die with success). When I had my forked child do the same thing but its within an eval, then I got the same sequence of loop iterations, but also got a lot of reinterpretition of cases the loop had already evaluated. What is it about being inside an eval that causes this fork oddity? The use of eval is handy to capture the die results in the parent and then log them.
In Section
Meditations
|
|