linux runtime: build on hosts without SOCK_CLOEXEC - #126
Open
turinglambdaai wants to merge 1 commit into
Open
turinglambdaai wants to merge 1 commit into
turinglambdaai wants to merge 1 commit into
Conversation
SOCK_CLOEXEC is a Linux-only socketpair flag; macOS (the dev-iteration harness for Linux hosts) lacks it, so platform/linux/runtime did not compile outside Linux. Fall back to setting FD_CLOEXEC on both ends right after the pair is created — this thread performs no I/O in between, so no descriptor can leak across an exec in that window. Verified: the BrainFuel GTK4 host now compiles, links, and runs against this runtime on macOS (arm64, libracketcs) with the same sources that CI compiles on Linux.
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.
Closes the compile gap found while dogfooding the Linux GTK4 host (BrainFuel rewrite) on an arm64 macOS dev machine.
SOCK_CLOEXECis a Linux-only socketpair flag;platform/linux/runtime/backend.cpptherefore did not compile outside Linux, so application teams cannot typecheck or run their Linux host locally the way the macOS and WinUI hosts allow.The fallback sets
FD_CLOEXECon both ends immediately aftersocketpairreturns; the creating thread performs no I/O orexecin between, so the no-leak guarantee is unchanged.Verification
libracketcs.a, boots the embedded backend, and completes bootstrap RPCs (same sources CI compiles on Linux).SOCK_CLOEXECpath unchanged.