|
|
|
@ -11,7 +11,6 @@ use crate::mm::{
|
|
|
|
|
translated_refmut,
|
|
|
|
|
};
|
|
|
|
|
use crate::fs::{
|
|
|
|
|
OSInode,
|
|
|
|
|
open_file,
|
|
|
|
|
OpenFlags,
|
|
|
|
|
};
|
|
|
|
@ -87,7 +86,7 @@ pub fn sys_waitpid(pid: isize, exit_code_ptr: *mut i32) -> isize {
|
|
|
|
|
});
|
|
|
|
|
if let Some((idx, _)) = pair {
|
|
|
|
|
let child = inner.children.remove(idx);
|
|
|
|
|
// confirm that child will be deallocated after removing from children list
|
|
|
|
|
// confirm that child will be deallocated after being removed from children list
|
|
|
|
|
assert_eq!(Arc::strong_count(&child), 1);
|
|
|
|
|
let found_pid = child.getpid();
|
|
|
|
|
// ++++ temporarily hold child lock
|
|
|
|
|