From 991af54a4be36e40addfd5da200aa37c83188be8 Mon Sep 17 00:00:00 2001 From: yasuoka <> Date: Tue, 3 Jun 2025 14:15:53 +0000 Subject: Again. 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. This commit fixes some minor problems of the previous. previous diff from guenther Much testing, review, assistence form tb@ ok tb@ millert@ for the previous ok asou --- src/lib/libc/stdlib/exit.3 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/lib/libc/stdlib/exit.3') diff --git a/src/lib/libc/stdlib/exit.3 b/src/lib/libc/stdlib/exit.3 index 22acade86c..ccb416ee82 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.18 2024/08/30 03:44:48 guenther Exp $ +.\" $OpenBSD: exit.3,v 1.19 2025/06/03 14:15:53 yasuoka Exp $ .\" -.Dd $Mdocdate: August 30 2024 $ +.Dd $Mdocdate: June 3 2025 $ .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