[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#90867: Menu is more important than it would seem



On Wed, 28 Mar 2001, Herbert Xu wrote:

> On Tue, Mar 27, 2001 at 11:37:52AM -0600, Adam Heath wrote:
> > On Tue, 27 Mar 2001, Herbert Xu wrote:
> >
> > > >> If that hit can be reduced to a single call to stat() or fstat() (and
> > > >> I can't see why it can't) then I can't believe that amounts to much of
> > >
> > > Linux 2.4 supports directory notification...
> >
> > Yes, but it does so stupidly.
> >
> > You can be notified when something changes in a directory, but it is up to you
> > to do an opendir(or rewinddir on a previously opened dir), and iterate thru
> > all the files, comparing with a previous list, to find what changed.
>
> But if you only care about one file, then it's not a problem at all.

But there is no way to tell the kernel to only look at that one file.  If you
have multiple files in that one directory, and any one of them changed, you
have to walk the entire list.

If you remove directory notification from your program, then it is back to
implementing a stat()/sleep() call.



Reply to: