mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
waitpid: fix deadlock
This commit is contained in:
@@ -51,12 +51,12 @@ syscallret syscall_waitpid(pid_t pid, int *status, int options){
|
||||
sibling = NULL;
|
||||
|
||||
while(child){
|
||||
if(pid > 0 && child->pid != pid)
|
||||
continue;
|
||||
|
||||
if(child->state == PROC_STATE_ZOMBIE){
|
||||
loop = false;
|
||||
break;
|
||||
if((pid > 0 && child->pid == pid) || pid == 0){
|
||||
loop = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(child->sibling)
|
||||
|
||||
Reference in New Issue
Block a user