Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Having registered items in the watch list, an application can determine which events have occurred by using read() to read events from the inotify file descriptor. If no events have occurred so far, then read() blocks until an event occurs (unless the O_NONBLOCK status flag has been set for the file descriptor, in which case the read() fails immediately with the error EAGAIN if no events are available).
After events have occurred, each read() returns a buffer (see Figure 19-2) containing one or more structures of the following type: