Repository navigation
Create close-on-exec pipes without pipe2 on Haiku - #544
Draft
duncanmcqueen wants to merge 1 commit into
Draft
duncanmcqueen wants to merge 1 commit into
duncanmcqueen wants to merge 1 commit into
Conversation
This was referenced Oct 14, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Create close-on-exec pipes on Haiku without pipe2. Both data offers and primary-selection offers currently use rustix::pipe::pipe_with, which is unavailable on that target.
Add one Haiku-only helper that creates an ordinary pipe and sets FD_CLOEXEC on both descriptors using rustix::io::fcntl_setfd. Other targets keep using pipe_with. The helper takes no flags argument, since its only supported operation is creating a close-on-exec pipe. Owned descriptors are closed automatically if flag setup fails.
Validation:
cargo check --libpassed.cargo check --lib --no-default-featurespassed with local Wayland system-backend patches. Those dependency changes are separate from this PR.This is draft while the related Wayland Haiku support is under review. The original application port used equivalent changes on SCTK 0.19.2/0.20.0; this PR is adapted to current master. Release backports will remain on the downstream fork for Winit 0.30 consumers.
AI assistance: Codex helped prepare the code, test and PR description.
Additional native check: an isolated test using this exact helper passed on Haiku, verifying FD_CLOEXEC on both pipe descriptors. Full toolkit unit tests remain blocked by missing fontconfig development files. Related connection support: Smithay/wayland-rs#979.