aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man2/fanotify_init.24
-rw-r--r--man7/fanotify.78
2 files changed, 11 insertions, 1 deletions
diff --git a/man2/fanotify_init.2 b/man2/fanotify_init.2
index e3a0b98540..94d0292f62 100644
--- a/man2/fanotify_init.2
+++ b/man2/fanotify_init.2
@@ -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
diff --git a/man7/fanotify.7 b/man7/fanotify.7
index 74f5105df6..05af2d3ab5 100644
--- a/man7/fanotify.7
+++ b/man7/fanotify.7
@@ -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),