diff options
author | Tony Cook <tony@develop-help.com> | 2013-12-12 16:22:06 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2013-12-18 13:42:53 +1100 |
commit | ee71f1d151acd0a4c10ebcec28f0798178529847 (patch) | |
tree | 4be0e61b90cc8e3204ea1fc66083f25ec3fee819 /pp_sys.c | |
parent | 6b0ff4b4f2542a206738f2f065066e9bf895cbf4 (diff) | |
download | perl-ee71f1d151acd0a4c10ebcec28f0798178529847.tar.gz |
[perl #118651] don't overwrite $! in readdir()
POSIX expects readdir() to leave errno alone when it reaches end of
directory without an error so that case can be detected. Do the same
in perl.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3858,7 +3858,7 @@ PP(pp_readdir) } while (gimme == G_ARRAY); if (!dp && gimme != G_ARRAY) - goto nope; + RETPUSHUNDEF; RETURN; |