Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for BSD's libinotify #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iteratee
Copy link

@iteratee iteratee commented Sep 3, 2020

libinotify emulates linux's inotify interface via a worker thread and kqueue
watches on the files.

The interface is compatible, but we need to change two things:
First, where we find the symbols for inotify, as they are in libinotify and not
in libc.
Second, we can't use epoll, so we instead use kqueue on the watch descriptor.
There are scaling limits on the number of watches as each watched file consumes
a file descriptor, but for many small projects this is sufficient.

I'm welcome to restructure the conditionals if there's a cleaner way. This is just a good start to compatibility.

libinotify emulates linux's inotify interface via a worker thread and kqueue
watches on the files.

The interface is compatible, but we need to change two things:
First, where we find the symbols for inotify, as they are in libinotify and not
in libc.
Second, we can't use epoll, so we instead use kqueue on the watch descriptor.
There are scaling limits on the number of watches as each watched file consumes
a file descriptor, but for many small projects this is sufficient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant