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:
Masamichi Takagi
2014-09-04 17:07:27 +09:00
parent fea02b0ece
commit a16c3170ef

View File

@ -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;
}