mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 18:03:25 +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<(), ()> {
|
) -> core::result::Result<(), ()> {
|
||||||
// Take the lock first to avoid the race when the `reaper_process` is exiting concurrently.
|
// 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 mut reaper_process_children = reaper_process.children().lock();
|
||||||
|
|
||||||
|
let is_init = is_init_process(&reaper_process);
|
||||||
let is_zombie = reaper_process.status().is_zombie();
|
let is_zombie = reaper_process.status().is_zombie();
|
||||||
if is_zombie {
|
if !is_init && is_zombie {
|
||||||
return Err(());
|
return Err(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user