svn commit: r357851 - stable/11/lib/libc/stdio
Kyle Evans
kevans at FreeBSD.org
Thu Feb 13 03:11:39 UTC 2020
Author: kevans
Date: Thu Feb 13 03:11:39 2020
New Revision: 357851
URL: https://svnweb.freebsd.org/changeset/base/357851
Log:
MFC r327181: fsync(3): correctly document return values
In r268924 the behavior of fflush was changed to return success
on read only streams. Document this.
Modified:
stable/11/lib/libc/stdio/fflush.3
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/lib/libc/stdio/fflush.3
==============================================================================
--- stable/11/lib/libc/stdio/fflush.3 Thu Feb 13 01:42:13 2020 (r357850)
+++ stable/11/lib/libc/stdio/fflush.3 Thu Feb 13 03:11:39 2020 (r357851)
@@ -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-stable-11
mailing list