This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make $fh->error report errors from both input and output
authorTony Cook <tony@develop-help.com>
Tue, 12 May 2020 00:29:17 +0000 (10:29 +1000)
committerKarl Williamson <khw@cpan.org>
Thu, 30 Jul 2020 21:29:22 +0000 (15:29 -0600)
commit89341f87f9fc65c4d7133e497bb04586e86b8052
tree3f2e824e612fe0e06933a6dc3522577a78b6fa30
parentb4aeee756d4d278cf1e2c723988261dc4562b832
make $fh->error report errors from both input and output

For character devices and sockets perl uses separate PerlIO objects
for input and output so they can be buffered separately.

The IO::Handle::error() method only checked the input stream, so
if a write error occurs error() would still returned false.

Change this so both the input and output streams are checked.

fixes #6799
dist/IO/IO.xs
dist/IO/t/io_xs.t