Commit Graph

115 Commits

Author SHA1 Message Date
Heinrich Schuchardt ec976a53a3 inotify.7: BUGS: Note possible bug triggered by watch descriptor reuse
Watch descriptor IDs are returned by inotify_add_watch().
When calling inotify_rm_watch() an IN_IGNORE is placed on the
inotify queue pointing to the ID of the removed watch.

inotify_add_watchi() should not return a watch descriptor ID for
which events are still on the queue but should return an
unused ID.

Unfortunately, the existing Kernel code does not provide such a
guarantee.

Actually, in rare cases watch descriptor IDs are returned by
inotify_add_watch() for which events are still on the inotify
queue.

See https://bugzilla.kernel.org/show_bug.cgi?id=77111

Cowritten-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-06-23 09:09:27 +02:00
Michael Kerrisk 2ef6778bce Removed trailing white space at end of lines 2014-05-28 16:00:50 +02:00
Heinrich Schuchardt 7a8110f6af inotify.7: munmap() does not generate inotify events
mmap() and msync() were already described as not leading to
inotify events. This patch adds munmap(). I created and executed
a test to verify this.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-26 10:16:05 +02:00
Michael Kerrisk 2483209a9c inotify.7: Minor changes to Heinrich Schuechardt's example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-24 23:07:08 +02:00
Heinrich Schuchardt ecd96f7c0e inotify.7: Add example program
This example of the usage of the inotify API shows the
usage of inotify_init1(2) and inotify_add_watch(2) as well
as polling and reading from the inotify file descriptor.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-24 22:42:29 +02:00
Michael Kerrisk d6fa0283d3 fallocate.2, open_by_handle_at.2, rename.2, syscalls.2, termios.3, inotify.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-05-08 11:03:36 +02:00
Heinrich Schuchardt f75d27e6b0 inotify.7: SEE ALSO: add fanotify(7)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-25 07:57:41 +02:00
David Prévot d2c3d8a829 inotify.7: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-17 07:49:54 +02:00
Michael Kerrisk fa1d49a63c Removed trailing white space at end of lines 2014-04-06 08:47:56 +02:00
Michael Kerrisk e449e5f15a inotify.7: Inotify does not report events for mmap(2) and msync(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk e226bed757 inotify.7: Inotify doesn't work for remote and pseudo filesystems
Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk fa51f4d941 inotify.7: Remind reader of the cookie value in discussion of rename events
Reported-by: Jan Kara <jack@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk 6f1a495406 inotify.7: Minor rewording
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk 6b1cc2c9a4 inotify.7: Add paragraph on cache consistency checking
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk 67898fdfd0 inotify.7: Reorganize "Limits and caveats"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk da977073d0 inotify.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk 85e179c5c2 inotify.7: Add text on dealing with rename() events
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk a79d28b202 inotify.7: Minor reorganization
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk 94d52c1529 inotify.7: Mention cache rebuilding to handle overflow events
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk 264276c6b0 inotify.7: Move discussion of application cache to start of "Limitations"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk 356911f692 inotify.7: Rewrite introductory section
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk ff6e23973d inotify.7: Add subheading for reading from inotify file descriptor
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk 1a737afd5a inotify.7: symlink(2) can generate IN_CREATE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk 415f63be17 inotify.7: Add some examples of events generated by various system calls
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-04-06 08:18:58 +02:00
Michael Kerrisk b01c936e4b inotify.7: Note that IN_UNMOUNT will be followed by an IN_IGNORED event
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-31 22:11:07 +02:00
Michael Kerrisk 39f43968d7 inotify.7: Note that IN_DELETE_SELF will be followed by IN_IGNORED
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-31 22:11:07 +02:00
Michael Kerrisk 7a64793b93 inotify.7: Add examples of syscalls that trigger IN_CREAT
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-31 22:11:07 +02:00
Michael Kerrisk b0e1ac43e0 inotify.7: Add examples of syscalls that trigger IN_ATTRIB
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-31 22:11:07 +02:00
Michael Kerrisk 79f8f40ccb inotify.7: Minor wording change
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-31 22:11:07 +02:00
Michael Kerrisk f54a125572 inotify.7: Add some examples of syscalls that trigger IN_MODIFY
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-31 22:11:07 +02:00
Michael Kerrisk f23fc716d5 inotify.7: Minor list reformatting
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-31 22:11:07 +02:00
Michael Kerrisk 49b07b8f8b inotify.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-31 22:11:07 +02:00
Michael Kerrisk 64aa9bcb39 inotify.7: Minor clarification
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-31 20:59:35 +02:00
Michael Kerrisk 70f70c9d40 inotify.7: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-31 20:59:31 +02:00
Michael Kerrisk f08cdf85df inotify.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-30 10:30:27 +02:00
Michael Kerrisk a15ead5e9f inotify.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-29 22:07:16 +01:00
Michael Kerrisk 7b5151b7f0 inotify.7: BUGS: IN_ONESHOT does now cause IN_IGNORED when the watch is dropped
A silent change as a result of the fanotify work in kernel 2.6.36.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-29 22:06:48 +01:00
Michael Kerrisk dede00fed9 inotify.7: Minor rewording
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-27 15:41:17 +01:00
Michael Kerrisk f20fc09276 inotify.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-27 15:33:47 +01:00
Michael Kerrisk c577b95c7b inotify.7: ffix: Reformat events list
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-27 15:33:14 +01:00
Michael Kerrisk 4a1e4cca21 inotify.7: Moving an object to another filesystem generates IN_DELETE_SELF
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-27 15:25:24 +01:00
Michael Kerrisk 22129aa9f5 inotify.7: srcfix: Note commit that fixed the "coalescing" bug
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-27 13:43:58 +01:00
Michael Kerrisk 2f48204194 inotify.7: Directory renames may invalidate multiple paths cached by application
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-27 06:45:17 +01:00
Michael Kerrisk 031de15217 inotify.7: Further describe the race when adding a watch to a new subtree
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-27 06:43:09 +01:00
Michael Kerrisk 3f3698d8a7 inotify.7: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-26 13:41:00 +01:00
Michael Kerrisk 8856aab855 inotify.7: Note rationale and consequences of event coalescing
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-26 13:05:11 +01:00
Michael Kerrisk 8817c2c829 inotify.7: execve(2) also generates IN_ACCESS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-03-26 07:33:15 +01:00
Michael Kerrisk 10850212d0 uselib.2, getfsent.3, regex.3, nsswitch.conf.5, inotify.7, man-pages.7, symlink.7: Replace uses of "e.g." in main text with "for example" or similar
Usual man-pages style is to use "e.g." only within
    parenthetical expressions.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk f0afb16a2e inotify.7: SEE ALSO: add inotifywait(1) and inotifywatch(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-09-16 14:45:49 +02:00
Michael Kerrisk 9ee4a2b6ec intro.1, time.1, access.2, acct.2, alloc_hugepages.2, bind.2, chdir.2, chmod.2, chown.2, chroot.2, clone.2, close.2, execve.2, fallocate.2, fcntl.2, getdents.2, getrusage.2, getxattr.2, init_module.2, inotify_add_watch.2, ioprio_set.2, kcmp.2, link.2, listxattr.2, lseek.2, madvise.2, mkdir.2, mknod.2, mmap.2, mount.2, move_pages.2, msgctl.2, nfsservctl.2, open.2, pivot_root.2, quotactl.2, read.2, readlink.2, removexattr.2, rename.2, rmdir.2, semctl.2, setfsgid.2, setfsuid.2, setresuid.2, setuid.2, setup.2, setxattr.2, shmctl.2, splice.2, spu_create.2, stat.2, statfs.2, swapon.2, symlink.2, sync.2, sync_file_range.2, sysfs.2, truncate.2, umount.2, unlink.2, unshare.2, ustat.2, utime.2, utimensat.2, write.2, btree.3, errno.3, fexecve.3, ftw.3, futimes.3, get_nprocs_conf.3, getcwd.3, getdirentries.3, getmntent.3, glob.3, mkfifo.3, mq_open.3, readdir.3, realpath.3, recno.3, remove.3, sem_open.3, shm_open.3, statvfs.3, sysconf.3, telldir.3, tmpfile.3, cciss.4, initrd.4, pts.4, sk98lin.4, vcs.4, core.5, filesystems.5, proc.5, boot.7, bootparam.7, capabilities.7, cpuset.7, credentials.7, feature_test_macros.7, fifo.7, hier.7, inotify.7, intro.7, mq_overview.7, path_resolution.7, pipe.7, sem_overview.7, shm_overview.7, spufs.7, symlink.7, unix.7, uri.7, sync.8: Global fix: s/file system/filesystem/
Notwithstanding 24d01c530c,
"filesystem" is the form used by the great majority of man pages
outside the man-pages project and in a number of other sources,
so let's go with that.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-08-08 10:07:57 +02:00