Question about the setting of watches.

Stef Bon stefbon at gmail.com
Wed Feb 29 10:58:11 PST 2012


Hi,

this is an off topic question. I'm sorry to ask this here, I do not
know a better place for this at this moment.

I'm working on a notify fs, which is a special version of an overlayfs,
which is aimed to be a better notify monitor than gamin is.

Part of notifyfs is a mountmonitor. It reads /proc/self/mountinfo for
current, added and removed mounts. It is used to keep track of mounts
managed by autofs.
Normallly watches are removed when a fs is unmounted. I'm experimenting with
watches are being set to "sleep" mode when a fs is unmounted by
autofs. When dealing with fs's (USB sticks for example) which have a
small timeout, it get's unmounted a lot.
For apps to setup watches again every time, these sleeping watches,
which are made awake when the fs is mounted again can be handy.

The mountmonitor is checking every mount found. But I wonder, is it
really necessary to keep track of mounts found in /proc, /dev and
/sys, like /sys/fs/cgroup when dealing with watches and keeping track
of changes? IE are there apps setting watches on/in directories like
/sys, proc and dev??

Thanks in advance,

Stef


More information about the xdg mailing list