Date: Thu, 8 Jan 2009 06:38:07 +0000 (UTC) From: David Schultz <das@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186887 - head/lib/libc/stdio Message-ID: <200901080638.n086c7pq011109@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: das Date: Thu Jan 8 06:38:06 2009 New Revision: 186887 URL: http://svn.freebsd.org/changeset/base/186887 Log: Set the error indicator on an attempt to write to a read-only stream. PR: 127335 MFC after: 2 weeks Modified: head/lib/libc/stdio/wsetup.c Modified: head/lib/libc/stdio/wsetup.c ============================================================================== --- head/lib/libc/stdio/wsetup.c Thu Jan 8 06:12:03 2009 (r186886) +++ head/lib/libc/stdio/wsetup.c Thu Jan 8 06:38:06 2009 (r186887) @@ -60,6 +60,7 @@ __swsetup(fp) if ((fp->_flags & __SWR) == 0) { if ((fp->_flags & __SRW) == 0) { errno = EBADF; + fp->_flags |= __SERR; return (EOF); } if (fp->_flags & __SRD) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901080638.n086c7pq011109>