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

Use kqueue1 where available #165

Open
ids1024 opened this issue Oct 21, 2023 · 1 comment
Open

Use kqueue1 where available #165

ids1024 opened this issue Oct 21, 2023 · 1 comment

Comments

@ids1024
Copy link

ids1024 commented Oct 21, 2023

I was just reading the release notes for the recent OpenBSD release (https://www.openbsd.org/74.html) and see it mentions a kqueue1, which FreeBSD and NetBSD apparently already have.

Although not usually a problem, opening a file descriptor and setting it CLOEXEC in separate calls can cause a race with another thread that spawns a subprocess. So kqueue1 should be used if available, like epoll_create1.

I think it should be fine to assume this function is available on FreeBSD and NetBSD, while for now it's desirable to support OpenBSD versions older the the very latest one.

@notgull
Copy link
Member

notgull commented Oct 21, 2023

I would like this functionality, but it would need to be added to rustix first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants