http://qs321.pair.com?node_id=1171706


in reply to Re^2: Eval/Fork lesson of the day
in thread Eval/Fork lesson of the day

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.