diff options
author | rnordier <rnordier@FreeBSD.org> | 1999-08-10 21:36:51 +0000 |
---|---|---|
committer | rnordier <rnordier@FreeBSD.org> | 1999-08-10 21:36:51 +0000 |
commit | 4368f240893bf7954a5c542c47bef3a0ce3bff1d (patch) | |
tree | 2541096c39ed97e19f41d2d53ab3cacda979cf5c /lib/libc/stdio/refill.c | |
parent | 38f9f909537ff2afecadff1902896471061a02c1 (diff) | |
download | FreeBSD-src-4368f240893bf7954a5c542c47bef3a0ce3bff1d.zip FreeBSD-src-4368f240893bf7954a5c542c47bef3a0ce3bff1d.tar.gz |
Treat an attempt to read from a write-only stream more consistently.
Submitted by: Anton Berezin <tobez@plab.ku.dk>
PR : 12852
Diffstat (limited to 'lib/libc/stdio/refill.c')
-rw-r--r-- | lib/libc/stdio/refill.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/stdio/refill.c b/lib/libc/stdio/refill.c index f0583f7..c05c5d4 100644 --- a/lib/libc/stdio/refill.c +++ b/lib/libc/stdio/refill.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)refill.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$Id$"; + "$Id: refill.c,v 1.6 1997/02/22 15:02:22 peter Exp $"; #endif /* LIBC_SCCS and not lint */ #include <errno.h> @@ -82,6 +82,7 @@ __srefill(fp) if ((fp->_flags & __SRD) == 0) { if ((fp->_flags & __SRW) == 0) { errno = EBADF; + fp->_flags |= __SERR; return (EOF); } /* switch to reading */ |