-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
api/src/imp/task/clone.rs
Outdated
| .init_new(FD_TABLE.copy_inner()); | ||
| } | ||
|
|
||
| if flags.contains(CloneFlags::CLONE_FS) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we separate these operations into some functions, such as operations corresponding to clone_fs and clone_thread flags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to do this best. Ideally we could reuse most of the code for clone3, but it's also possible to just forward clone to clone3 after implementing clone3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linux just forward clone to clone3 after implementing clone3(see https://github.com/torvalds/linux/blob/c62f4b82d57155f35befb5c8bbae176614b87623/kernel/fork.c#L2953-L2989)
Co-authored-by: mivik <mivikq@gmail.com>
Blocked by oscomp/arceos#30
Description
This PR introduces basic process management and thread support via
axprocess.The "basic" I mentioned includes two aspects:
getsidandsetpgid, but they are already implemented inaxprocessso we can later add these functions easily. Not adding them to keep this PR's simplicity.exit_groupandexecve.This PR also resolves #18 (comment).