Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/gen clarify closing of descriptor returned by dirfd(3)



details:   https://anonhg.NetBSD.org/src/rev/b2fa4b99a2e8
branches:  trunk
changeset: 343071:b2fa4b99a2e8
user:      plunky <plunky%NetBSD.org@localhost>
date:      Fri Jan 22 08:50:00 2016 +0000

description:
clarify closing of descriptor returned by dirfd(3)

diffstat:

 lib/libc/gen/directory.3 |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (35 lines):

diff -r 7ab2a4d0fda0 -r b2fa4b99a2e8 lib/libc/gen/directory.3
--- a/lib/libc/gen/directory.3  Fri Jan 22 06:51:47 2016 +0000
+++ b/lib/libc/gen/directory.3  Fri Jan 22 08:50:00 2016 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index