polling icon indicating copy to clipboard operation
polling copied to clipboard

Use kqueue1 where available

Open ids1024 opened this issue 1 year ago • 1 comments

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.

ids1024 avatar Oct 21 '23 17:10 ids1024