From 9abaf3d27d3599f76acdc701168ea9755221147c Mon Sep 17 00:00:00 2001 From: guenther <> Date: Mon, 12 Aug 2024 20:53:09 +0000 Subject: Make exit(), fclose(), fflush(), and freopen() comply with POSIX-2008 requirements for setting the underlying file position when flushing read-mode streams, and make an fseek()-after-fflush() not change the underlying file position. Much testing, review, and assistance from tb@ ok tb@ millert@ --- src/lib/libc/stdlib/exit.3 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libc/stdlib/exit.3 b/src/lib/libc/stdlib/exit.3 index a1c43780d6..5e006e53f4 100644 --- a/src/lib/libc/stdlib/exit.3 +++ b/src/lib/libc/stdlib/exit.3 @@ -29,9 +29,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: exit.3,v 1.16 2014/11/30 21:21:59 schwarze Exp $ +.\" $OpenBSD: exit.3,v 1.17 2024/08/12 20:53:09 guenther Exp $ .\" -.Dd $Mdocdate: November 30 2014 $ +.Dd $Mdocdate: August 12 2024 $ .Dt EXIT 3 .Os .Sh NAME @@ -54,9 +54,7 @@ Call the functions registered with the .Xr atexit 3 function, in the reverse order of their registration. .It -Flush all open output streams. -.It -Close all open streams. +Flush and close all open streams. .It Unlink all files created with the .Xr tmpfile 3 @@ -79,6 +77,7 @@ function never returns. .Sh SEE ALSO .Xr _exit 2 , .Xr atexit 3 , +.Xr fflush 3 , .Xr intro 3 , .Xr sysexits 3 , .Xr tmpfile 3 @@ -86,7 +85,7 @@ function never returns. The .Fn exit function conforms to -.St -isoC-99 . +.St -p1003.1-2024 . .Sh HISTORY An .Fn exit -- cgit v1.2.3-55-g6feb