]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
fanotify_init.2, fanotify.7: Document FAN_REPORT_TID
authornixiaoming <nixiaoming@huawei.com>
Sat, 17 Nov 2018 16:32:10 +0000 (18:32 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 26 Feb 2019 16:39:00 +0000 (17:39 +0100)
fanotify_init.2: add new flag FAN_REPORT_TID
fanotify.7: update description of member pid in
    struct fanotify_event_metadata

Signed-off-by: nixiaoming <nixiaoming@huawei.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/fanotify_init.2
man7/fanotify.7

index e3a0b98540f08391ea949d6aff8ef6251301ff61..94d0292f62563a3b3c7710669a369e8afe8a4003 100644 (file)
@@ -142,6 +142,10 @@ Remove the limit of 8192 marks.
 Use of this flag requires the
 .B CAP_SYS_ADMIN
 capability.
+.TP
+.BR FAN_REPORT_TID " (since Linux 4.20)"
+.\" commit d0a6a87e40da49cfc7954c491d3065a25a641b29
+Report thread id (TID) instead of process id (PID).
 .PP
 The
 .I event_f_flags
index 74f5105df6c3fd6f7bb313184897fd97300a547e..05af2d3ab5618ec86c1291ad60b7c820d7ef5567 100644 (file)
@@ -223,7 +223,13 @@ Hence, when the receiver of the fanotify event accesses the notified file or
 directory using this file descriptor, no additional events will be created.
 .TP
 .I pid
-This is the ID of the process that caused the event.
+If flag
+.B FAN_REPORT_TID
+was set in
+.BR fanotify_init (2),
+this is the TID of the thread that caused the event.
+Otherwise, this the PID of the process that caused the event.
+.PP
 A program listening to fanotify events can compare this PID
 to the PID returned by
 .BR getpid (2),