[Dovecot] Still weird UID ordering issues with maildir
Todd Vierling
tv at duh.org
Sun Sep 11 19:07:15 EEST 2005
On Sun, 11 Sep 2005, Todd Vierling wrote:
> I don't see how skipping files like that should happen -- HOWEVER, you do
> realize that readdir(3) has no guarantee of ordering, right? (Meaning that
> two successive calls to readdir(3) can, per POSIX, return the same list of
> files in a completely different order.)
Actually that comment should have read:
Meaning that two successive passes over the same directory with readdir(3)
can, per POSIX, return the same list of files in a completely different
order.
This means that once you do a rewinddir(3) or closedir(3), all bets are off
as to what kind of ordering you will get on the next pass through the
directory. Oftentimes rewinddir(3) followed by readdir(3) will still be
consistent, but on OSs that do so, you may not see new files either; the dir
handle may be a snapshot of data at the time opendir(3) happened instead.
--
-- Todd Vierling <tv at duh.org> <tv at pobox.com> <todd at vierling.name>
More information about the dovecot
mailing list