Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
C HTML Other Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
pnotify pnotify is an event notification framework for monitoring files and directories. It is designed to be portable across different Unix-like operating systems, and currently supports Linux and BSD. The pnotify API is very similar to the inotify API under Linux. ___________________________________ Download | Documentation | Mailing list ___________________________________ Rationale Kernel-based filesystem event notification is a relatively new phenonemon, and several different approaches have been taken by various operating systems. Linux uses inotify, BSD uses kqueue, Apple has kqueue and it's own Spotlight system calls, Solaris has FEM, Windows has the NTFS Change Journal and the ReadDirectoryChangesW function, and so forth. The goal of pnotify is to provide a simple, cross-platform API for monitoring filesystem events. The library will conceal all of the messy implementation-specific details from the user and help them to write more portable programs. History pnotify was born out of an effort to port the inotify API from Linux to BSD. This initial effort took the form of a userspace library that would translate inotify requests into their kqueue(4) equivalent. After some time, it became clear that kqueue was not sophisticated enough to support all of the functionality of inotify. There was also the problem of threadsafety; inotify relies on shared global data structures, which is normal within the kernel but complicates the design of a userspace library. Eventually, it became clear that a new API was needed to address these portability and threadsafety issues. This new API became 'pnotify', to indicate that it is a portable subset of the inotify API. Supported Platforms pnotify has been ported to the following platforms: * Linux 2.6 * OpenBSD 4.0 * NetBSD 3.1 * FreeBSD 6.2 * MacOS/X 10.4 There are platforms that are not supported due to lack of developer resources. Interested parties with access to these platforms are encouraged to port the library to their platform. For example: * Sun OpenSolaris will soon get a similar API called FEM that could be supported. * Microsoft Windows has a filesystem event notification mechanism At the current time, there is no generic polling mechanism to use as a fallback for systems that don't have a kernel event mechanism like inotify or kqueue. Usage When you run './configure && make && make install', pnotify is built as a shared library and installed under the /usr/local prefix. Even though pnotify is built as a shared library by default, it is easier for application developers to include pnotify.c and pnotify.h in their source tree and not depend on the existence of a shared library. Download The source code may be downloaded from the download page. You may also check out a working copy of the latest development sources by issuing the following command: svn checkout http://pnotify.googlecode.com/svn/trunk/ pnotify If you just want a quick peek at the source code, you can browse the webSVN repository Documentation * The pnotify(3) manpage in the following formats: + HTML + PostScript + PDF * Future development will include support for non-blocking I/O syscalls. To see what this will look like, check out nio.h * Doxygen-generated annotated data structures and function reference. Mailing List There is a mailing list for discussion about the pnotify library. Click here to sign up, post a question or comment, or browse through the archives. Contact the Author For more information, contact Mark Heily at firstname.lastname@example.org Related Links * FAM - the original, unmaintained monitoring utility from SGI. * gamin - the modern FAM replacement. Part of the GNOME project. * libevent - a library for building event-driven servers. Supports socket events, but not filesystem events. __________________________________________________________________ (C) 2007 Mark Heily. References 1. file://localhost/usr/home/mheily/proj/pnotify/manpage.html 2. http://linux.die.net/man/7/inotify 3. file://localhost/usr/home/mheily/proj/pnotify/index.html#download 4. file://localhost/usr/home/mheily/proj/pnotify/index.html#docs 5. file://localhost/usr/home/mheily/proj/pnotify/index.html#mlist 6. http://code.google.com/p/pnotify/downloads/list 7. http://pnotify.googlecode.com/svn/trunk/ 8. file://localhost/usr/home/mheily/proj/pnotify/manpage.html 9. file://localhost/usr/home/mheily/proj/pnotify/manpage.ps 10. file://localhost/usr/home/mheily/proj/pnotify/manpage.pdf 11. http://pnotify.googlecode.com/svn/trunk/nio.h 12. file://localhost/usr/home/mheily/proj/pnotify/doxygen/html/files.html 13. http://groups.google.com/group/pnotify/topics 14. mailto:email@example.com 15. http://oss.sgi.com/projects/fam/ 16. http://www.gnome.org/~veillard/gamin/ 17. http://monkey.org/~provos/libevent/