feat(syscall): add clone3 support #79
Open
+409
−64
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.
Description
This PR adds initial support for the
clone3system call in StarryOS.The implementation introduces the basic
clone3syscall path and supportsa commonly used subset of
clone3flags, enabling user programs and teststo create new processes using the modern
clone3interface.This work lays the groundwork for improving Linux compatibility and enables
future support for thread creation and synchronization primitives built on
top of
clone3(e.g., futex-based threading).Implementation
clone3syscall handler and integrated it into the syscalldispatch framework.
clone3arguments and flags,including:
exit_signalCLONE_PARENT_SETTIDCHILD_CLEARTIDexpected Linux error semantics where possible.
Some Linux features related to
clone3(e.g., session/process group semanticsand
PR_SET_CHILD_SUBREAPER) are not yet supported in StarryOS and aredocumented as known limitations.
Additional Context
clone3test programsand passes basic functionality tests.
do not block the correctness of this initial
clone3support.focused on establishing a correct and minimal clone3 syscall foundation.