You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt.Println("Listening to events for:", mountPoint)
108
-
var eventTypes fanotify.EventType
109
-
eventTypes = fanotify.FileAccessed |
110
-
fanotify.FileOrDirectoryAccessed |
111
-
fanotify.FileModified |
112
-
fanotify.FileOpenedForExec |
113
-
fanotify.FileOpened
114
-
err = listener.MarkMount(eventTypes, false)
115
-
if err != nil {
116
-
fmt.Println("MarkMount:", err)
117
-
os.Exit(1)
118
-
}
119
-
go listener.Start()
120
-
for event := range listener.Events {
121
-
fmt.Println(event)
122
-
}
123
-
listener.Stop()
124
-
}
125
-
```
126
19
## Known Issues
127
20
128
21
Certain flag combinations / event types cause issues with event reporting.
129
22
130
-
-`fanotify.FileCreated` (`unix.FAN_CREATE`) cannot be or-ed / combined with `fanotify.FileClosed` (`unix.FAN_CLOSE_WRITE` or `unix.FAN_CLOSE_NOWRITE`). The `fanotify` event notification group does not generate any event for this combination.
131
-
132
-
- Using `fanotify.FileOpened` with any of the event types containing `OrDirectory` (`unix.FAN_ONDIR`) causes an event flood for the directory and then stopping raising any events at all.
133
-
134
-
-`fanotifyFileOrDirectoryOpened` with any of the other event types causes an event flood for the directory and then stopping raising any events at all.
23
+
-`fanotify.FileCreated` cannot be or-ed / combined with `fanotify.FileClosed`. The `fanotify` event notification group does not generate any event for this combination.
24
+
- Using `fanotify.FileOpened` with any of the event types containing `OrDirectory` causes numerous duplicate events for the path.
25
+
-`fanotifyFileOrDirectoryOpened` with any of the other event types causes numerous duplicate events for the path.
0 commit comments