On Tue, Aug 31, 1999 at 11:15:49AM +0100, Doug Rabson wrote:
[...]
> > Attached is a patch for GNU fileutils-4.0 that will make rm
> > yield when the workaround code catches a bad readdir().
>
> Are you using a FreeBSD port for GNU fileutils? If so, your patch should
> be directed to the port maintainer. I suggest that you also forward the
> patch to the GNU fileutils maintainers.
I'm not aware of a FreeBSD port, but I will send a patch to the
GNU fileutils maintainer. I just would like to fix our readdir()
rather than struggling with the symptoms.
Unfortunately I have no idea how to deal with this target. The
first thing I did was finding out where to look for the bug---in
GNU rm or in FreeBSD readdir().
The Single Unix Specification Version 2 says:
[...]
files may be removed from a directory or added to a directory
asynchronously to the operation of readdir().
[...]
and
[...]
If a file is removed from or added to the directory after the
most recent call to opendir() or rewinddir(), whether a
subsequent call to readdir() returns an entry for that file
is unspecified.
[...]
But what happens here is the stream position pointer get mixed up
and it seems that it skips one or two directory entries on
susequent calls to readdir(). So I think it should be concidered as
broken. I started looking at nfs_vnops.c but at the time I have
no idea how it works.
Björn
--
-----BEGIN GEEK CODE BLOCK-----
GCS d--(+) s++: a- C+++(-) UB++++OSI++++$ P+++(-) L+++(--) !E W- N+ o>+
K- !w !O !M !V PS++ PE- PGP++ t+++ !5 X++ tv- b+++ D++ G e+ h-- y+
------END GEEK CODE BLOCK------
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message