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