The kernel queues API provides a way for an application to receive notifications whenever a given file or directory is modified in any way, including changes to the file’s contents, attributes, name, or length. Your application can also receive notification if you are watching a block or character device and access is revoked through a call to revoke(2).
The kernel queues API also provides a way to monitor child processes and find out when they call exit(3), fork(2), exec(3), and so on. This use of kernel queues is beyond the scope of this document. For more information about kernel queues and processes, you should read the FreeBSD documentation for kernel queues. You can find links to this documentation at http://people.freebsd.org/~jmg/kq.html.
Choosing an Event Mechanism
Using Kernel Queues
A Brief Example
For More Information
Last updated: 2008-03-11