Skip to content

Inotify can raise some errors if init is too fast #10

@samoht

Description

@samoht

See https://github.com/dsheets/ocaml-inotify-event/blob/master/src/inotify_events.ml#L38

The fix is too run:

    (* Block until there is something to read. Otherwise, our ioctl
       returns 0 and then makes a 0 read which errors with EINVAL. *)
    ignore (Unix.select [inotify] [] [] ~-.1.);

before calling Inotify.read

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions