diff options
author | Eitan Adler <eadler@FreeBSD.org> | 2017-12-25 19:49:05 +0000 |
---|---|---|
committer | Eitan Adler <eadler@FreeBSD.org> | 2017-12-25 19:49:05 +0000 |
commit | 2b3b4736961bc791b2a8280a63187d44595c53f0 (patch) | |
tree | f76e9730d35523162b1dee33e058040eb3af1551 /lib/libc | |
parent | 96e286a7f8b8c13d20d34a51a7ddf435679adacb (diff) | |
download | src-2b3b4736961bc791b2a8280a63187d44595c53f0.tar.gz src-2b3b4736961bc791b2a8280a63187d44595c53f0.zip |
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
Notes
Notes:
svn path=/head/; revision=327181
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdio/fflush.3 | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/libc/stdio/fflush.3 b/lib/libc/stdio/fflush.3 index 6132bafb41a6..890323c42437 100644 --- a/lib/libc/stdio/fflush.3 +++ b/lib/libc/stdio/fflush.3 @@ -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 , |