Skip to content

Use kqueue1 where available #165

@ids1024

Description

@ids1024

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.

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