Function naughtyfy::api::fanotify_close

source ·
pub fn fanotify_close(fd: i32) -> Result<(), Error>
Expand description

Closes the file descriptor returned by fanotify_init()

Argument

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:#?}");