summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/directory.3
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>1998-06-03 06:54:24 +0000
committerjkoshy <jkoshy@FreeBSD.org>1998-06-03 06:54:24 +0000
commit903a43c624cb4c0aea332463313f2451a4682621 (patch)
treee5566dd57a0d8cd897d9477ccddf258f318c0a3f /lib/libc/gen/directory.3
parent15683e67b6ddc96370600d3f77ecbd3c3e4cdbb6 (diff)
downloadFreeBSD-src-903a43c624cb4c0aea332463313f2451a4682621.zip
FreeBSD-src-903a43c624cb4c0aea332463313f2451a4682621.tar.gz
Correct wrong claim about `telldir()' cookie lifetimes.
PR: 4043 Submitted by: Joe Orthoefer <j_orthoefer@tia.net>
Diffstat (limited to 'lib/libc/gen/directory.3')
-rw-r--r--lib/libc/gen/directory.327
1 files changed, 11 insertions, 16 deletions
diff --git a/lib/libc/gen/directory.3 b/lib/libc/gen/directory.3
index 0abbe5f..a1ca347 100644
--- a/lib/libc/gen/directory.3
+++ b/lib/libc/gen/directory.3
@@ -94,6 +94,16 @@ The
function
returns the current location associated with the named
.Em directory stream .
+Values returned by
+.Fn telldir
+are good only for the lifetime of the
+.Dv DIR
+pointer,
+.Fa dirp ,
+from which they are derived. If the directory is closed and then
+reopened, prior values returned by
+.Fn telldir
+will no longer be valid.
.Pp
The
.Fn seekdir
@@ -106,22 +116,7 @@ The new position reverts to the one associated with the
.Em directory stream
when the
.Fn telldir
-operation was performed. Values returned by
-.Fn telldir
-are good only for the lifetime of the
-.Dv DIR
-pointer,
-.Fa dirp ,
-from which they are derived.
-If the directory is closed and then reopened, the
-.Fn telldir
-value may be invalidated due to undetected directory compaction.
-It is safe to use a previous
-.Fn telldir
-value immediately after a call to
-.Fn opendir
-and before any calls to
-.Fn readdir .
+operation was performed.
.Pp
The
.Fn rewinddir
OpenPOWER on IntegriCloud