Hi Henry, On 05/30/2018 05:54 PM, henry.wilson@xxxxxxxxxxx wrote:
From: Henry Wilson <henry.wilson@xxxxxxxxxxx> Added documentation for new flag IN_EXCL_ADD for inotify_add_watch() which is used to only allow new watches to be created.
>
Information obtained from a patch I submitted to the linux kernel https://marc.info/?l=linux-fsdevel&m=263867599306147&w=2
That link appears not to work? But I did find the email threads. Thanks for the patch. So, you say below "since Linux 4.17", but surely it will be "from Linux 4.18"? I think some of the detail about why this flag exists (as covered in the email thread) could also usefully be in the man page. What do you think? Cheers, Michael
--- man7/inotify.7 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/man7/inotify.7 b/man7/inotify.7 index 85c05a9bc..21a66cb17 100644 --- a/man7/inotify.7 +++ b/man7/inotify.7 @@ -366,6 +366,18 @@ results if is not a directory. Using this flag provides an application with a race-free way of ensuring that the monitored object is a directory. +.TP +.BR IN_EXCL_ADD " (since Linux 4.17)" +Watch +.I pathname +only if it does not already have a watch associated with it; +the error +.B EEXIST +results if +.I pathname +already is being watched. +Using this flag provides an application with a way of ensuring +that new watches do not modify existing ones. .RE .PP The following bits may be set in the
-- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html