From b3ad760956b981983ffeae9270cb6f7d12fb1237 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sat, 6 Nov 2010 07:40:29 +0100 Subject: [PATCH] inotify.7: Document IN_EXCL_UNLINK This flag was added in Linux 2.6.36. See kernel commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6. Signed-off-by: Michael Kerrisk --- man7/inotify.7 | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/man7/inotify.7 b/man7/inotify.7 index 0bea64980..d029fe68b 100644 --- a/man7/inotify.7 +++ b/man7/inotify.7 @@ -23,9 +23,7 @@ .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" -.\" FIXME 2.6.36 adds IN_EXCL_UNLINK -.\" -.TH INOTIFY 7 2010-09-27 "Linux" "Linux Programmer's Manual" +.TH INOTIFY 7 2010-10-06 "Linux" "Linux Programmer's Manual" .SH NAME inotify \- monitoring file system events .SH DESCRIPTION @@ -256,6 +254,22 @@ when calling .BR IN_DONT_FOLLOW " (since Linux 2.6.15)" Don't dereference \fIpathname\fP if it is a symbolic link. .TP +.B IN_EXCL_UNLINK " (since Linux 2.6.36)" +.\" commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6 +By default, when watching events on the children of a directory, +events are generated for children even after they have been unlinked +from the directory. +This can result in large numbers of uninteresting events for +some applications (e.g., if watching +.IR /tmp , +in which many applications create temporary files whose +names are immediately unlinked). +Specifying +.B IN_EXCL_UNLINK +changes the default behavior, +so that events are not generated for children after +they have been unlinked from the watched directory. +.TP .B IN_MASK_ADD Add (OR) events to watch mask for this pathname if it already exists (instead of replacing mask).