Make -T BADHANDLE set errno with fatal warnings
authorFather Chrysostomos <sprout@cpan.org>
Sat, 14 Jan 2012 08:07:46 +0000 (00:07 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 14 Jan 2012 08:07:46 +0000 (00:07 -0800)
commit2ad48547234bdf521daff432b65a0b173efd2a19
tree9b32f61c1f8db0b7df9a8a4e88c1054e8f230a74
parent31b139ba853d7a7a7b30c4c0e7a90020a641854d
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?)
pp_sys.c
t/op/filetest.t