in reply to Re: Weird use warnings FATAL behavior
in thread Weird use warnings FATAL behavior
It looks like the child process tries to warn which gets turned into a die which gets caught by the eval and thus causes the child to continue on to the line after the eval instead of doing what it was planning to do after it warned.
Not really that much of a surprise, IMHO, since you told it to do all of those things.
Then the parent doesn't get tricky notice of the child being unable to exec (since you forced the child to get side-tracked) so open succeeds and the parent continues on from there.
One bug is that $$ doesn't get updated since the forked code isn't expected to survive long enough to be able to run any Perl code that uses $$, so trying to report $$ just confuses things.