mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Support PR_SET/GET_CHILD_SUBREAPER for sys_prctl
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
0903457be3
commit
801eac9386
@ -375,6 +375,13 @@ fn clone_child_process(
|
||||
// Sets parent process and group for child process.
|
||||
set_parent_and_group(process, &child);
|
||||
|
||||
// Updates `has_child_subreaper` for the child process after inserting
|
||||
// it to its parent's children to make sure the `has_child_subreaper`
|
||||
// state of the child process will be consistent with its parent.
|
||||
if process.has_child_subreaper.load(Ordering::Relaxed) {
|
||||
child.has_child_subreaper.store(true, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
Ok(child)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user