[net.unix-wizards] new directory access routines caveat

gwyn@brl-vld@sri-unix.UUCP (08/04/83)

From:      Doug Gwyn (VLD/VMB) <gwyn@brl-vld>

While converting the Columbus "make" to use the new directory access
routines a la Berkeley, I discovered the following interesting problem.

One would think that to rescan a directory you would just use rewinddir()
on the open DIR stream.  However, due to directory-block buffering inside
the directory access package, this may fail to pick up new files added to
the directory since the opendir().  The general solution is to closedir()
and opendir() again.

You can see how "make" would get terribly confused by this.