diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-01-14 00:07:46 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-01-14 00:07:46 -0800 |
commit | 2ad48547234bdf521daff432b65a0b173efd2a19 (patch) | |
tree | 9b32f61c1f8db0b7df9a8a4e88c1054e8f230a74 /pp_sys.c | |
parent | 31b139ba853d7a7a7b30c4c0e7a90020a641854d (diff) | |
download | perl-2ad48547234bdf521daff432b65a0b173efd2a19.tar.gz |
Make -T BADHANDLE set errno with fatal warnings
Due to the order of the statements, SETERRNO would never be reached
with fatal warnings.
I’ve added another SETERRNO out of paranoia. If there is a nicely-
behaved __WARN__ handler, we should still be setting errno just before
-T returns, in case the handler changed it. We can’t do much in
the case of fatal handlers that do system calls. (Is $! localised
for those?)
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3359,6 +3359,7 @@ PP(pp_fttext) len = 512; } else { + SETERRNO(EBADF,RMS_IFI); report_evil_fh(gv); SETERRNO(EBADF,RMS_IFI); RETPUSHUNDEF; |