new directory access routines caveat
gwyn at brl-vld
gwyn at brl-vld
Thu Aug 4 11:25:47 AEST 1983
From: Doug Gwyn (VLD/VMB) <gwyn at 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.
More information about the Comp.unix.wizards
mailing list