From: Michael Kerrisk Date: Sat, 6 Feb 2021 09:26:43 +0000 (+0100) Subject: setbuf.3: POSIX doesn't require to errno to be unchanged after successful setbuf() X-Git-Tag: man-pages-5.11~228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdd65639ba37af073e97dffbd74c1dbdec70ef35;p=thirdparty%2Fman-pages.git setbuf.3: POSIX doesn't require to errno to be unchanged after successful setbuf() See https://www.austingroupbugs.net/view.php?id=397#c799 Signed-off-by: Michael Kerrisk --- diff --git a/man3/setbuf.3 b/man3/setbuf.3 index b79ddfd88b..ccfeb83ba4 100644 --- a/man3/setbuf.3 +++ b/man3/setbuf.3 @@ -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 ()