an idea for Kqueue improvement.

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.
 
Back
Top