Re: famd and mount
> Without it, nautilus won't refresh automatically directories where
> files change, and, more annoying the panel won't refresh the menus.
> There are other little things that won't work, but it's perfectly
> safe to remove it.
Which is the reason why fam is keeping an eye on /mnt/floppy for
example. Because nautilus told it to do so. I don't use Nautilus
here, and I have never had a problem with fam.
4. When the application is through monitoring a file or
directory, it should call FAMCancelMonitor. If the
application wants to temporarily suspend monitoring of
a file or directory, it may call FAMSuspendMonitor. When
the application is ready to start monitoring again, it
calls FAMResumeMonitor.
Without actually having looked neither at fam nor nautilus code, *I'd*
think the problem is Nautilus, not fam. The stupid thing is, you need
to use nautilus to unmount devices, because Nautilus is the one who
told fam to monitor something in the first place. I've never seen this
problem on IRIX, which is why I think the problem is not with fam
itself. Look:
$ mount /cdrom/
$ ./test -d /cdrom # this is the text application shipped with libfam-dev
lots of output... background this thing
$ umount /cdrom/
umount: /cdrom: device is busy
umount: /cdrom: device is busy
foreground test again and kill it (^C)
DIR /cdrom: /cdrom EndExist
Interupted!
$ umount /cdrom/
and /cdrom is unmounted.
AFAIK there's no way for fam to know that the user wants to unmount the
media. And the configuration file doesn't let you tell it not to
monitor something in particular. I have no idea how IRIX manages this
situation.
What I find irritating is that it's not possible to ask fam what is it
monitoring and why or how to tell it to stop doing so:
When fam is called on to monitor a file, it passes back a
FAMRequest structure. This structure uniquely identifies the
request so that it may be cancelled, using FAMCancelMonitor or
suspended, using FAMSuspendMonitor.
fam is not as bad as some people here seem to think. It's much more
efficient than just wildly poll directories.
Marcelo
Reply to: