Correct wait4 when the child is not found
Make wait4 return -ECHILD when pid is specified and it's not found.
This commit is contained in:
@ -333,7 +333,7 @@ rescan:
|
||||
ihk_mc_spinlock_unlock_noirq(&child_iter->lock);
|
||||
}
|
||||
|
||||
if (empty) {
|
||||
if (empty || (!child && pid != -1)) {
|
||||
ihk_mc_spinlock_unlock_noirq(&proc->ftn->lock);
|
||||
return -ECHILD;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user