Hi Michael,
Thanks for responding quickly.
On 31/05/18 14:05, Michael Kerrisk (man-opages) wrote:
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://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmarc.info%2F%3Fl%3Dlinux-fsdevel%26m%3D263867599306147%26w%3D2&data=02%7C01%7C%7C708a86e7b43442335c6808d5c6f73d7d%7C3cc4d7f3134640c7a1165d3d71759649%7C0%7C1%7C636633687550073634&sdata=PfgdtOqqF4fKuDFU8W2bGkxyEzJIZxz%2FqNfHun4RnaQ%3D&reserved=0
That link appears not to work? But I did find the email threads.
I see outlook is playing shenanigans with links, that's annoying.
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?
I'm not familiar with how the kernel release cycle works, so I assumed
it may get in before the end of the rc series. But I suppose it would be
more logical for a new feature to be in the next version.
I shall send another patch with the updated name, additional error
condition, version, and rationale.
Regards, Henry.
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