summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-05-03 15:17:43 +0000
committerkib <kib@FreeBSD.org>2016-05-03 15:17:43 +0000
commit838f7d1304c723206899cd4965a1a8ba0761d68f (patch)
tree7218ce83f4cf8d64338a89b31295a32f6e5dc984 /lib
parentcacb7c41e21bf8ff9e1e931a5a98bef75389a4e3 (diff)
downloadFreeBSD-src-838f7d1304c723206899cd4965a1a8ba0761d68f.zip
FreeBSD-src-838f7d1304c723206899cd4965a1a8ba0761d68f.tar.gz
Add EVFILT_VNODE open, read and close notifications.
While there, order EVFILT_VNODE notes descriptions alphabetically. Based on submission, and tested by: Vladimir Kondratyev <wulf@cicgroup.ru> MFC after: 2 weeks
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/kqueue.234
1 files changed, 26 insertions, 8 deletions
diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2
index 221f451..548aeb8 100644
--- a/lib/libc/sys/kqueue.2
+++ b/lib/libc/sys/kqueue.2
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 2, 2016
+.Dd May 3, 2016
.Dt KQUEUE 2
.Os
.Sh NAME
@@ -367,14 +367,28 @@ Takes a file descriptor as the identifier and the events to watch for in
.Va fflags ,
and returns when one or more of the requested events occurs on the descriptor.
The events to monitor are:
-.Bl -tag -width "Dv NOTE_RENAME"
+.Bl -tag -width "Dv NOTE_CLOSE_WRITE"
+.It Dv NOTE_ATTRIB
+The file referenced by the descriptor had its attributes changed.
+.It Dv NOTE_CLOSE
+A file descriptor referencing the monitored file, was closed.
+The closed file descriptor did not possesed write access.
+.It Dv NOTE_CLOSE_WRITE
+A file descriptor referencing the monitored file, was closed.
+The closed file descriptor has write access.
+.Pp
+This note, as well as
+.Dv NOTE_CLOSE ,
+are not activated when files are closed forcibly by
+.Xr unmount 2 or
+.Xr revoke 2 .
+Instead,
+.Dv NOTE_REVOKE
+is sent for such events.
.It Dv NOTE_DELETE
The
.Fn unlink
-system call
-was called on the file referenced by the descriptor.
-.It Dv NOTE_WRITE
-A write occurred on the file referenced by the descriptor.
+system call was called on the file referenced by the descriptor.
.It Dv NOTE_EXTEND
For regular file, the file referenced by the descriptor was extended.
.Pp
@@ -383,20 +397,24 @@ as the result of rename operation.
The
.Dv NOTE_EXTEND
event is not reported when a name is changed inside the directory.
-.It Dv NOTE_ATTRIB
-The file referenced by the descriptor had its attributes changed.
.It Dv NOTE_LINK
The link count on the file changed.
In particular, the
.Dv NOTE_LINK
event is reported if a subdirectory was created or deleted inside
the directory referenced by the descriptor.
+.It Dv NOTE_OPEN
+The file referenced by the descriptor was opened.
+.It Dv NOTE_READ
+A read occurred on the file referenced by the descriptor.
.It Dv NOTE_RENAME
The file referenced by the descriptor was renamed.
.It Dv NOTE_REVOKE
Access to the file was revoked via
.Xr revoke 2
or the underlying file system was unmounted.
+.It Dv NOTE_WRITE
+A write occurred on the file referenced by the descriptor.
.El
.Pp
On return,
OpenPOWER on IntegriCloud