[Pkg-octave-devel] Bug#550823: Updating load-path cache based on modification times probably a bad idea (was: Race condition between Octave 3.2.3 and unlink())
Søren Hauberg
soren at hauberg.org
Tue Oct 20 20:34:12 UTC 2009
tir, 20 10 2009 kl. 22:00 +0200, skrev Jaroslav Hajek:
> The problem is in load_path::update, which checks the directory's
> modification time to decide on whether to rescan it. The resolution is
> only in seconds, though. But some check is surely wanted because you
> want to avoid useless rescans. I don't have a better idea. One could
> even say this is a limitation of the system, which provides no way to
> tell whether the directory has changed during the last second. Maybe
> rehash() could ignore the stamp for some directories? But which ones?
Perhaps it would be better to use a notification system instead of
checking for file changes? Specifically, I'm thinking that we should be
able to use, say, 'inotify' to notify us that a file has changed. When
such a notification is sent Octave could then re-read the file. This
would probably also be faster than the current approach of scanning for
file changes.
Søren
More information about the Pkg-octave-devel
mailing list