diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-18 02:16:40 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-18 02:16:40 +0000 |
commit | 5c7a8c7888175e16e13670318410610dcb21c26f (patch) | |
tree | f0bc31274bb0036f66a07472161997938809ed2b /pp_sys.c | |
parent | b0a484d2bfe866f41e22a982ca9f2013ae9c3848 (diff) | |
download | perl-5c7a8c7888175e16e13670318410610dcb21c26f.tar.gz |
check ferror() only if read() returned 0
p4raw-id: //depot/perl@1527
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1329,7 +1329,7 @@ PP(pp_sysread) { length = PerlIO_read(IoIFP(io), buffer+offset, length); /* fread() returns 0 on both error and EOF */ - if (PerlIO_error(IoIFP(io))) + if (length == 0 && PerlIO_error(IoIFP(io))) length = -1; } if (length < 0) |