Skip to content
This repository was archived by the owner on Apr 30, 2023. It is now read-only.
This repository was archived by the owner on Apr 30, 2023. It is now read-only.

Switch to nonblocking I/O, read from stdin. #2

@cpu

Description

@cpu

The original fanotify example program that serves the basis of the rfanotify port uses poll on the fanotify descriptor in nonblocking mode. It also polls stdin to allow the user to quit gracefully by entering any input to stdin.

Presently rfanotify reads from the fanotify descriptor in a blocking fashion. It also doesn't read from stdin or offer any graceful exit, requiring the user to send a signal instead.

I should switch rfanotify to use InitFlags::FAN_NONBLOCK with Fanotify::init and implement an async approach to reading events and monitoring stdin. Since I'm super new to rust I punted on non-blocking I/O in the first version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions