Skip to content

Port to OpenBSD - #264

Open
moebiusband73 wants to merge 3 commits into
mitchellh:mainfrom
moebiusband73:main
Open

moebiusband73 wants to merge 3 commits into
mitchellh:mainfrom
moebiusband73:main

Conversation

@moebiusband73

Copy link
Copy Markdown

This PR adds OpenBSD support in preparation of OpenBSD support for Ghostty.
Also adds a fix in kqueue to implement loop wakeup for BSDs

moebiusband73 and others added 3 commits November 28, 2026 08:16
On non-Darwin kqueue targets (FreeBSD, OpenBSD) the loop wakeup was a
panicking stub and thread pool completions never woke the loop. A loop
blocked in kevent() with no timers could therefore hang forever waiting
for thread pool work. Implement the wakeup with a self-pipe registered
as a level-triggered EVFILT_READ with zero udata, drained whenever it
fires, and wake the loop from thread_perform on all kqueue targets.

With the wakeup working, re-enable the thread pool tests that were
skipped on FreeBSD and the kqueue thread pool test on all kqueue
targets.

Also:
- async: share the kqueue waitRead between AsyncEventFd and AsyncPipe
- bump Zig to 0.17.1 in CI and flake.nix, minimum_zig_version to 0.17.0
- CI: cross-build FreeBSD/OpenBSD targets, add an OpenBSD VM test job
- README/comments: list FreeBSD and OpenBSD as supported

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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