Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gen Document that rewinddir(3) might either reopen ...



details:   https://anonhg.NetBSD.org/src/rev/caeaab2541bb
branches:  trunk
changeset: 959546:caeaab2541bb
user:      dholland <dholland%NetBSD.org@localhost>
date:      Wed Feb 17 23:51:04 2021 +0000

description:
Document that rewinddir(3) might either reopen or just lseek the dir.

(Currently it depends on the underlying directory, but documenting the
exact details seems inadvisable.)

Also, Someone(TM) should check if POSIX permits this or if we ought to
improve the implementation.

diffstat:

 lib/libc/gen/directory.3 |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 324cf3f4fe00 -r caeaab2541bb lib/libc/gen/directory.3
--- a/lib/libc/gen/directory.3  Wed Feb 17 23:39:46 2021 +0000
+++ b/lib/libc/gen/directory.3  Wed Feb 17 23:51:04 2021 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: directory.3,v 1.42 2021/02/17 23:39:46 dholland Exp $
+.\"    $NetBSD: directory.3,v 1.43 2021/02/17 23:51:04 dholland 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 January 22, 2016
+.Dd February 17, 2021
 .Dt DIRECTORY 3
 .Os
 .Sh NAME
@@ -225,6 +225,15 @@
 current state of the corresponding directory, as if a call to
 .Fn opendir
 was made.
+It is not specified whether this refers to the ``corresponding directory''
+by name or by underlying object.
+(These can differ if
+.Xr rename 2
+has been used.)
+.\" Note: currently the underlying fd is reopened if and only if
+.\" __DTF_READALL is in effect, which is true for union mounts and
+.\" nfs; documenting that exactly seems inadvisable since it might
+.\" change.  -- dholland 20210217
 .Pp
 If
 .Fa dirp



Home | Main Index | Thread Index | Old Index