This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
set $! when statting a closed filehandle
authorZefram <zefram@fysh.org>
Wed, 15 Nov 2017 08:11:37 +0000 (08:11 +0000)
committerZefram <zefram@fysh.org>
Wed, 15 Nov 2017 08:11:37 +0000 (08:11 +0000)
commit97c8f3e6ed903d7d1ab2b973a137ff8412e94c87
treec877853bce7868d8ce13a867cebc85d0b0ae119b
parentaa2bc4d385298947b20667efc390d3182feaebe1
set $! when statting a closed filehandle

When a stat fails because it's on a closed or otherwise invalid
filehandle, $! was often not being set, depending on the operation
and the nature of the invalidity.  Consistently set it to EBADF.
Fixes [perl #108288].
MANIFEST
doio.c
pp_sys.c
t/op/stat_errors.t [new file with mode: 0644]