mirror of
https://github.com/janet-lang/janet
synced 2025-05-18 07:14:12 +00:00
Don't call wait twice when closing or gcing.
This commit is contained in:
parent
6172a9ca2d
commit
3df7921fdc
@ -485,8 +485,10 @@ static int janet_proc_gc(void *p, size_t s) {
|
|||||||
/* Kill and wait to prevent zombies */
|
/* Kill and wait to prevent zombies */
|
||||||
kill(proc->pid, SIGKILL);
|
kill(proc->pid, SIGKILL);
|
||||||
int status;
|
int status;
|
||||||
|
if (!(proc->flags & JANET_PROC_WAITING)) {
|
||||||
waitpid(proc->pid, &status, 0);
|
waitpid(proc->pid, &status, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user