Module Name: src
Committed By: plunky
Date: Fri Jan 22 08:50:00 UTC 2016
Modified Files:
src/lib/libc/gen: directory.3
Log Message:
clarify closing of descriptor returned by dirfd(3)
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libc/gen/directory.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/gen/directory.3
diff -u src/lib/libc/gen/directory.3:1.38 src/lib/libc/gen/directory.3:1.39
--- src/lib/libc/gen/directory.3:1.38 Mon Oct 8 18:15:09 2012
+++ src/lib/libc/gen/directory.3 Fri Jan 22 08:50:00 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: directory.3,v 1.38 2012/10/08 18:15:09 njoly Exp $
+.\" $NetBSD: directory.3,v 1.39 2016/01/22 08:50:00 plunky Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)directory.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd October 15, 2011
+.Dd January 22, 2016
.Dt DIRECTORY 3
.Os
.Sh NAME
@@ -246,10 +246,12 @@ associated with the directory stream spe
Upon failure,
.Fn dirfd
returns \-1.
-The returned file descriptor should be closed by
-.Fn closedir
-instead of
-.Xr close 2 .
+The returned file descriptor should not be closed by
+.Xr close 2 ,
+it will be released when
+.Fa dirp
+is closed with
+.Fn closedir .
.Pp
The rationale of
.Fn dirfd