Re: [Nautilus-list] Directory change signals?



"Karl M. Hegbloom" wrote:
>  It would be neat if a program could register itself with the OS
>  kernel in some way, asking to be informed of any modifications made
>  by other processes to the contents of a directory.
> 
>  How would that work?  A signal?  `poll' or `select' on the DIR?

Exactly how this will work is very contentious (though it may have been
resolved since I last checked). The functionality is not in the kernel
but exists in some other Unix kernels like SGI's. It seems likely (to
me) that given the strong end-user potential this has, unlike other
kernel changes, this will be something that is pushed into the next
development branch. I was sort of hoping it would make 2.4, but
obviously it hasn't :-(

>  Can Linux already do that?

However, that said SGI has actually released a version of their file
alteration monitor "fam" (which I believe runs in user-space, but you
have to register a specific set of files for it to monitor), and on a
larger scale a kernel-mode inode monitor. Patches for standard kernels
exist at http://oss.sgi.com/projects/fam/ that include these. We would
have *loved* to use such functionality in Nautilus, but we didn't feel
it was a good idea to require kernel modules to ship with our program.
If you are interested, one possibility would be to integrate this
functionality as an optional extra into gnome-vfs so that kernels that
*do* have it gnome-vfs and hence nautilus will work more "perfectly".

-Seth





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