Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Dec 2017 19:49:05 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r327181 - head/lib/libc/stdio
Message-ID:  <201712251949.vBPJn5bQ054359@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Mon Dec 25 19:49:05 2017
New Revision: 327181
URL: https://svnweb.freebsd.org/changeset/base/327181

Log:
  fsync(3): correctly document return values
  
  In r268924 the behavior of fflush was changed to return success
  on read only streams. Document this.
  
  Reported by:	zrj@DragonFlyBSD.org

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

Modified: head/lib/libc/stdio/fflush.3
==============================================================================
--- head/lib/libc/stdio/fflush.3	Mon Dec 25 19:42:04 2017	(r327180)
+++ head/lib/libc/stdio/fflush.3	Mon Dec 25 19:49:05 2017	(r327181)
@@ -32,7 +32,7 @@
 .\"     @(#)fflush.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd December 25, 2017
 .Dt FFLUSH 3
 .Os
 .Sh NAME
@@ -87,9 +87,7 @@ is set to indicate the error.
 The
 .Fa stream
 argument
-is not an open stream, or, in the case of
-.Fn fflush ,
-not a stream open for writing.
+is not an open stream.
 .El
 .Pp
 The function
@@ -97,7 +95,12 @@ The function
 may also fail and set
 .Va errno
 for any of the errors specified for the routine
-.Xr write 2 .
+.Xr write 2 ,
+except that in case of
+.Fa stream
+being a read-only descriptor,
+.Fn fflush
+returns 0.
 .Sh SEE ALSO
 .Xr write 2 ,
 .Xr fclose 3 ,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712251949.vBPJn5bQ054359>