summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>1999-05-17 23:47:27 +0000
committerarchie <archie@FreeBSD.org>1999-05-17 23:47:27 +0000
commita83bfbcb2fb824e9238792da8c1b64761adf534d (patch)
tree6c41509b2427f118e4bbd32c93437922e92b46b0 /lib/libc/stdio
parentd32a1cc01336771081c88894c19472588fbd2217 (diff)
downloadFreeBSD-src-a83bfbcb2fb824e9238792da8c1b64761adf534d.zip
FreeBSD-src-a83bfbcb2fb824e9238792da8c1b64761adf534d.tar.gz
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.
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/fopen.34
1 files changed, 4 insertions, 0 deletions
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
OpenPOWER on IntegriCloud