Bug 76333

Summary: [patch] ferror(3): EOF indicator can be cleared by not only clearerr(3).
Product: Documentation Reporter: Yoshihiko Sarumaru <mistral>
Component: Books & ArticlesAssignee: Tom Rhodes <trhodes>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Yoshihiko Sarumaru 2005-01-17 07:30:24 UTC
	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.

Fix: This patch is for RELENG_4 (1.3.2.4) ferror.3, sorry.
How-To-Repeat: 	man 3 feof
Comment 1 dfilter service freebsd_committer freebsd_triage 2009-01-28 01:11:30 UTC
Author: trhodes
Date: Wed Jan 28 01:11:20 2009
New Revision: 187805
URL: http://svn.freebsd.org/changeset/base/187805

Log:
  Remove comment about clearerr() being the only method of clearing
  the EOF indicator, fseek() may also be used for this.
  
  Bump document date.
  
  PR:		76333
  Submitted by:	Yoshihiko Sarumaru <mistral@imasy.or.jp>

Modified:
  head/lib/libc/stdio/ferror.3

Modified: head/lib/libc/stdio/ferror.3
==============================================================================
--- head/lib/libc/stdio/ferror.3	Wed Jan 28 00:15:35 2009	(r187804)
+++ head/lib/libc/stdio/ferror.3	Wed Jan 28 01:11:20 2009	(r187805)
@@ -32,7 +32,7 @@
 .\"     @(#)ferror.3	8.2 (Berkeley) 4/19/94
 .\" $FreeBSD$
 .\"
-.Dd January 10, 2003
+.Dd January 27, 2009
 .Dt FERROR 3
 .Os
 .Sh NAME
@@ -77,8 +77,6 @@ The function
 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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 2 Tom Rhodes freebsd_committer freebsd_triage 2009-01-28 01:11:50 UTC
State Changed
From-To: open->patched

Patch applied to CURRENT, thanks for the submission! 


Comment 3 Tom Rhodes freebsd_committer freebsd_triage 2009-01-28 01:11:50 UTC
Responsible Changed
From-To: freebsd-doc->trhodes

Over to me.
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2011-02-26 02:10:37 UTC
State Changed
From-To: patched->closed

This has already been MFCed