svn commit: r327181 - head/lib/libc/stdio
Eitan Adler
eadler at FreeBSD.org
Mon Dec 25 19:49:09 UTC 2017
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 at 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 ,
More information about the svn-src-all
mailing list