Function naughtyfy::api::fanotify_close
source · Expand description
Closes the file descriptor returned by fanotify_init()
Argument
fd-fd- file descriptor returned byfanotify_init()
Example
let fd = fanotify_init(FAN_CLASS_NOTIF, 0).unwrap();
fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_MOUNT, FAN_ACCESS, libc::AT_FDCWD, "./");
let fan_events = fanotify_read(fd);
println!("{fan_events:#?}");