From a83bfbcb2fb824e9238792da8c1b64761adf534d Mon Sep 17 00:00:00 2001 From: archie Date: Mon, 17 May 1999 23:47:27 +0000 Subject: Add a note that when a stream opened via fdopen() is closed via fclose(), the underlying file descriptor is also closed. To me at least this wasn't immediately obvious. --- lib/libc/stdio/fopen.3 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/libc') diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3 index f954d6c..a82da5e 100644 --- a/lib/libc/stdio/fopen.3 +++ b/lib/libc/stdio/fopen.3 @@ -129,6 +129,10 @@ function associates a stream with the existing file descriptor, The .Fa mode of the stream must be compatible with the mode of the file descriptor. +When the stream is closed via +.Xr fclose 3 , +.Fa fildes +is closed also. .Pp The .Fn freopen -- cgit v1.1