]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
setbuf.3: POSIX doesn't require to errno to be unchanged after successful setbuf()
authorMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 6 Feb 2021 09:26:43 +0000 (10:26 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 6 Feb 2021 09:26:43 +0000 (10:26 +0100)
See https://www.austingroupbugs.net/view.php?id=397#c799

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/setbuf.3

index b79ddfd88b05ff7c3bacb3fb2b99c49b3418c43a..ccfeb83ba4dc37f9c76efb2cf8eba23d7b1b620d 100644 (file)
@@ -188,6 +188,21 @@ The
 and
 .BR setvbuf ()
 functions conform to C89 and C99.
+.SH NOTES
+POSIX notes
+.\" https://www.austingroupbugs.net/view.php?id=397#c799
+.\" 0000397: setbuf and errno
+that the value of
+.I errno
+is unspecified after a call to
+.BR setbuf ()
+and further notes that, since the value of
+.I errno
+is not required to be unchanged after a successful call to
+.BR setbuf (),
+applications should instead use
+.BR setvbuf ()
+in order to detect errors.
 .SH BUGS
 .\" The
 .\" .BR setbuffer ()