wait_zombie: don't wait attached process

refs #726
This commit is contained in:
Tomoki Shirasawa
2016-04-21 20:28:36 +09:00
parent aa77228453
commit 397bf3f4a6

View File

@@ -294,8 +294,8 @@ static int wait_zombie(struct thread *thread, struct process *child, int *status
} }
ppid = child->ppid_parent->pid; ppid = child->ppid_parent->pid;
if(ppid == 1 || child->nowait) if(child->ppid_parent->pid != thread->proc->pid || child->nowait)
return 0; return child->pid;
request.number = __NR_wait4; request.number = __NR_wait4;
request.args[0] = child->pid; request.args[0] = child->pid;
request.args[1] = 0; request.args[1] = 0;