Just another Perl shrine | |
PerlMonks |
Re^4: Testing for readdir failure (perlbug errno test without localizing)by Anonymous Monk |
on May 26, 2013 at 00:20 UTC ( [id://1035281]=note: print w/replies, xml ) | Need Help?? |
As you can see $! needs to be reset in advance "to be meaningful". Yup, logic bug is logic bug :) Compare Perl_do_close (called by pp_close ie close ) to pp_readdir pp_readdir test errno without localizing, do_close doesn't test errno at all closedir has this issue, and probably many others, maybe 40 others I wouldn't be surprised if other functions testing errno have this issue too -- this needs explicit testing / reviewing / patching
In Section
Seekers of Perl Wisdom
|
|