Rewrite exit() and exit_group()

This commit is contained in:
Ruihan Li
2024-11-23 22:08:38 +08:00
committed by Tate, Hongliang Tian
parent 5efc32b6ea
commit 35c20620bc
24 changed files with 364 additions and 249 deletions

View File

@ -260,7 +260,11 @@ fn clone_child_task(
thread_builder.build()
};
process.tasks().lock().push(child_task.clone());
process
.tasks()
.lock()
.insert(child_task.clone())
.map_err(|_| Error::with_message(Errno::EINTR, "the process has exited"))?;
let child_posix_thread = child_task.as_posix_thread().unwrap();
clone_parent_settid(child_tid, clone_args.parent_tid, clone_flags)?;