Reply To: Question to mt-daapd developper (inotify request)

#7164
rpedde
Participant

@mas wrote:

And I thought dbus was some sort of inter process communication system.

As such it would be something distinctly different than a file change notifier…

But the idea of using such a thing sounds interesting in principle. What do you mean with an abstraction layer? Wouldnt simply linking against e.g. libfam (quite common) and using its functions do the job already???

Sure, but I’d have to write one for every different one. Fam doesn’t work because of well-known polling limits, and a requirement to hang a notification on every directory and subdirectory in the search tree.

Fam is great for monitoring a single directory when viewing it in an explorer window, but sucks for monitoring a whole tree.

So you are back to writing one for dnotify, one for dqueue, etc. Don’t really want to maintain all those. Also, none of these would work on embedded devices (although that’s not a deal killer).

At most, I’d probably write an ipc mechanism for other programs to ask the server to re-scan a file. Then the file watcher could run from outside the server.