# inotify for FreeBSD kernel?



## JoeSchmuck (Oct 26, 2013)

I know we have libinotify of which I unfortunately do not know how to use, but I am curious if inotify will be slated to be built into the FreeBSD kernel. I'm not sure who could even answer this question.

In my particular situation I am running FreeBSD with MiniDLNA. Unfortunately the library of media will not refresh when a changes occurs because MiniDLNA is looking for an inotify event to tell it something changed, or that's what it looks like. So this is why I'm asking about if/when inotify will be included into the FreeBSD kernel.

Thank you,
Joe


----------



## SirDice (Oct 28, 2013)

JoeSchmuck said:
			
		

> I know we have libinotify of which I unfortunately do not know how to use, but I am curious if inotify will be slated to be built into the FreeBSD kernel. I'm not sure who could even answer this question.


It won't. We have kqueue(2).


----------



## JoeSchmuck (Oct 28, 2013)

Thanks. Not exactly what I wanted to hear but that's fine. Guess it's time to attempt to learn how to use kqueue in order to monitor a directory and all its sub-directories for a change. I'm sure I'll find an example, just integrating it into the current code that uses inotify will be a learning experience, assuming I succeed.


----------



## kpa (Oct 28, 2013)

It depends on the licensing of that code if it will ever be included in FreeBSD kernel. No matter how good it is. If it's GPL or anything like it there's no way it's going to be included.


----------



## priyadarshan (Nov 20, 2014)

security/fswatch is not at the kernel level, but offers an interface to the kqueue() API: https://github.com/emcrisostomo/fswatch.

(See also Thread 38162.)


----------

