Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2020 03:11:39 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r357851 - stable/11/lib/libc/stdio
Message-ID:  <202002130311.01D3BdpA068161@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 ,



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