DragonFly commits List (threaded) for 2008-05
DragonFly BSD
DragonFly commits List (threaded) for 2008-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/include dirent.h src/lib/libc/gen readdir.c telldir.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 3 May 2008 16:41:05 -0700 (PDT)

:I don't think this is a problem.  Quoting from SUSv3:
:
:If a file is removed from or added to the directory after the most recent=
:=20
:call to opendir() or rewinddir(), whether a subsequent call to readdir() =
:
:returns an entry for that file is unspecified.
:
:and
:
:One of the perceived problems of implementation is that returning to a=20
:given point in a directory is quite difficult to describe formally, in=20
:spite of its intuitive appeal, when systems that use B-trees, hashing=20
:functions, or other similar mechanisms to order their directories are=20
:considered. The definition of seekdir() and telldir() does not specify=20
:whether, when using these interfaces, a given directory entry will be see=
:n=20
:at all, or more than once.
:
:cheers
:   simon

    Yah, I still hate that it doesn't work properly, though.  telldir()
    and seekdir() should probably just be removed from the standard
    entirely.

    I have figured out a way to make it work, but it requires creating
    a new system call capable of returning an array of directory cookies
    in addition to loading the buffer.  I'm not going to spend time on
    it now, but it's there if anyone wants a side project.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



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