Date: Mon, 17 Jan 2005 16:29:40 +0900 (JST) From: Yoshihiko Sarumaru <mistral@imasy.or.jp> To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/76333: EOF indicator can be cleared by not only clearerr(3). Message-ID: <200501170729.j0H7TeSA040928@shimako.yamayuri.org> Resent-Message-ID: <200501170730.j0H7UOVL036577@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 76333 >Category: docs >Synopsis: EOF indicator can be cleared by not only clearerr(3). >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 17 07:30:24 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Yoshihiko Sarumaru >Release: FreeBSD 4.11-STABLE i386 >Organization: >Environment: System: FreeBSD shimako.yamayuri.org 4.11-STABLE FreeBSD 4.11-STABLE #1: Mon Jan 10 01:36:16 JST 2005 sarumaru@shimako.yamayuri.org:/usr/src/sys/compile/Z505VRK i386 >Description: The feof(3) tells that "The end-of-file indicator can only be cleared by the function clearerr()." But fseek(fp, 0, SEEK_SET) or writing extra bytes to the stream can clear the EOF indicator, too. POSIX (SUSv3) doesn't mention about it. >How-To-Repeat: man 3 feof >Fix: This patch is for RELENG_4 (1.3.2.4) ferror.3, sorry. --- /usr/src/lib/libc/stdio/ferror.3 Sat Dec 15 03:33:57 2001 +++ ferror.3 Mon Jan 17 16:24:45 2005 @@ -69,8 +69,6 @@ tests the end-of-file indicator for the stream pointed to by .Fa stream , returning non-zero if it is set. -The end-of-file indicator can only be cleared by the function -.Fn clearerr . .Pp The function .Fn ferror >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501170729.j0H7TeSA040928>