Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends StarryOS’s task/syscall layer to support the clone3 syscall and improves pidfd handling (including a thread-specific pidfd path for CLONE_THREAD | CLONE_PIDFD), plus related exit notification plumbing.
Changes:
- Added
sys_clone3implementation and wired it into syscall dispatch. - Refactored
cloneimplementation around a unifiedCloneArgs/CloneFlagspath and added thread-specific pidfd creation. - Introduced a per-thread exit
PollSetand expandedpidfd_open/PidFdto support thread pidfds and nonblocking mode.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| kernel/src/task/ops.rs | Wakes a per-thread exit event during thread exit. |
| kernel/src/task/mod.rs | Adds exit_event to Thread for exit notification. |
| kernel/src/syscall/task/mod.rs | Registers and re-exports the new clone3 module. |
| kernel/src/syscall/task/clone3.rs | Implements sys_clone3 argument parsing and dispatch into unified clone logic. |
| kernel/src/syscall/task/clone.rs | Refactors clone into CloneArgs::do_clone, adds new clone flags, and adds thread/process pidfd creation. |
| kernel/src/syscall/mod.rs | Adds syscall dispatch case for Sysno::clone3. |
| kernel/src/syscall/fs/pidfd.rs | Adds pidfd_open flags parsing (thread + nonblock) and thread pidfd creation. |
| kernel/src/file/pidfd.rs | Adds thread/process pidfd constructors, nonblocking state, and changes polling/exit tracking mechanism. |
| build-dora.sh | Adds a local build/deploy helper script for a specific environment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AsakuraMizu
reviewed
Mar 4, 2026
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.
Description
Building upon #79, this PR:
clone3-specific checkscloneis invoked with theCLONE_THREAD | CLONE_PIDFDflags.