# an idea for Kqueue improvement.



## atarahas (Apr 22, 2010)

I have been looking into writing a backup program for FreeBSD. In doing so, it would be very helpful to have a feature that would allow Kqueue to be used to watch all files on the file system for modifications and for the creation of new files anywhere in the system, in order to keep a log of all changes to the filesystem. This way when a back up is run, the log can be used just to backup those files which have been updated. It seems like it is  good idea to allow kqueue to be used for a wide range of notification of kernel and system events, including filesystem events of modification, deletion and file creation in single files, directories and the entire system, socket events, etc.

What would also be of value would be to allow a file descriptor returned by the Kqueue system to be able to be watched with select and other event notification systems, allowing Kqueue to be used with event loops which use select(). If an event occurs on something watched by kqueue, it would trigger an event on the fd returned by kqueue system, which could be watched by select using some event loop that uses select(). There are a lot of event loops out there that use select.


----------



## danger@ (May 2, 2010)

http://socghop.appspot.com/gsoc/student_project/show/google/gsoc2010/freebsd/t127230758798
http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg71097.html


----------

