aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliot Hughes <enh@google.com>2018-10-03 13:00:28 -0700
committerMichael Kerrisk <mtk.manpages@gmail.com>2018-11-05 16:52:40 +0100
commit7c2c86efb7b922c768b9260b184c2893f72f3dfc (patch)
treee3a60fbd7849e57acb98f1d07238f3be10b3fcb1
parentc36a6bedf681884a3278e1b9f46108e22e5f238c (diff)
downloadman-pages-7c2c86efb7b922c768b9260b184c2893f72f3dfc.tar.gz
getmntent.3: Clarify that endmntent() should be used rather than fclose()
This doesn't actually matter on any C library I know of --- they all just do a NULL check and forward to fclose(3). (The actual mistake I saw was someone not realizing that they had to call *anything*.) Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man3/getmntent.34
1 files changed, 4 insertions, 0 deletions
diff --git a/man3/getmntent.3 b/man3/getmntent.3
index 8f3f2686ac..6ccc26b5f9 100644
--- a/man3/getmntent.3
+++ b/man3/getmntent.3
@@ -84,6 +84,10 @@ required and can take the same values as the
.I mode
argument of
.BR fopen (3).
+The returned stream should be closed using
+.BR endmntent ()
+rather than
+.BR fclose (3).
.PP
The
.BR getmntent ()