mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 09:53:24 +00:00
Always move zombie children to init
This commit is contained in:
committed by
Jianfeng Jiang
parent
5ed5647d42
commit
ceb79ea27a
@ -82,8 +82,10 @@ fn move_process_children(
|
||||
) -> core::result::Result<(), ()> {
|
||||
// Take the lock first to avoid the race when the `reaper_process` is exiting concurrently.
|
||||
let mut reaper_process_children = reaper_process.children().lock();
|
||||
|
||||
let is_init = is_init_process(&reaper_process);
|
||||
let is_zombie = reaper_process.status().is_zombie();
|
||||
if is_zombie {
|
||||
if !is_init && is_zombie {
|
||||
return Err(());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user