<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Aha.<BR>
<A href="http://www.cz.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/readdir.c">http://www.cz.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/readdir.c</A><BR>
<BR>
<BR>
Strongly hints at problems related to deleting and enumerating at the same time.<BR>
>From that then, I'll make another speculation -- enumeration ends up missing entries.<BR>
<BR>
<BR>
IF IF IF the directory is viewed like an array, and if readdir maintains a position,<BR>
moving forwad in chunks, and if delete underneath it shifts everything down,<BR>
then, I think one can see the problem. I'm not sure which of these statements is true though.<BR>
<BR>
<BR>
Certainly deleting while enumerating is not in general obvious how to deal with.<BR>
Depending on a few factors. In STL documentation, they always mention<BR>
what iterators are invalidated by deletion. It varies from collection to collection<BR>
and perhaps other aspects.<BR>
<BR>
<BR>
As to why my "rewrite" isn't working, I don't know, I can't look at until Monday.<BR>
It looks simple and correct, I tested it some, and should deal with delete-during-enumerate.<BR>
<BR>
<BR>
- Jay<BR> </body>
</html>