summaryrefslogtreecommitdiff
path: root/pnotify/pnotify-0.2/README
blob: 23d5a552a93eb9afbfc7d2fbca403b3ff2aec9a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

                                    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
   [1]pnotify API is very similar to the [2]inotify API under Linux.
                    ___________________________________

              [3]Download | [4]Documentation | [5]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.0
     * 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 [6]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
   [7]webSVN repository

Documentation

     * The pnotify(3) manpage in [8]HTML or [9]PostScript format.
     * Doxygen-generated API reference manual (coming soon)

Mailing List

   There is a mailing list for discussion about the pnotify library.
   Click [10]here to sign up, post a question or comment, or browse
   through the archives.

Contact the Author

   For more information, contact Mark Heily at [11]devel@heily.com

Related Links

     * [12]FAM - the original, unmaintained monitoring utility from SGI.
     * [13]gamin - the modern FAM replacement. Part of the GNOME project.
     * [14]libevent - a library for building event-driven servers.
       Supports socket events, but not filesystem events.
     _________________________________________________________________

   (C) 2007 Mark Heily.

References

   1. file://localhost/pnotify/manpage.html
   2. http://linux.die.net/man/7/inotify
   3. file://localhost/pnotify/index.html#download
   4. file://localhost/pnotify/index.html#docs
   5. file://localhost/pnotify/index.html#mlist
   6. http://code.google.com/p/pnotify/downloads/list
   7. http://pnotify.googlecode.com/svn/trunk/
   8. file://localhost/pnotify/manpage.html
   9. file://localhost/pnotify/manpage.ps
  10. http://groups.google.com/group/pnotify/topics
  11. mailto:devel@heily.com
  12. http://oss.sgi.com/projects/fam/
  13. http://www.gnome.org/~veillard/gamin/
  14. http://monkey.org/~provos/libevent/