mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Add vfork syscall and related clone flags
This commit is contained in:
committed by
Jianfeng Jiang
parent
9a974a0483
commit
43e43ca133
@ -137,6 +137,14 @@ impl CloneArgs {
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn for_vfork() -> Self {
|
||||
Self {
|
||||
flags: CloneFlags::CLONE_VFORK | CloneFlags::CLONE_VM,
|
||||
exit_signal: Some(SIGCHLD),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u64> for CloneFlags {
|
||||
@ -158,7 +166,8 @@ impl CloneFlags {
|
||||
| CloneFlags::CLONE_SETTLS
|
||||
| CloneFlags::CLONE_PARENT_SETTID
|
||||
| CloneFlags::CLONE_CHILD_SETTID
|
||||
| CloneFlags::CLONE_CHILD_CLEARTID;
|
||||
| CloneFlags::CLONE_CHILD_CLEARTID
|
||||
| CloneFlags::CLONE_VFORK;
|
||||
let unsupported_flags = *self - supported_flags;
|
||||
if !unsupported_flags.is_empty() {
|
||||
warn!("contains unsupported clone flags: {:?}", unsupported_flags);
|
||||
|
Reference in New Issue
Block a user