1
0
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:
Calvin Rose 2021-11-27 09:05:43 -06:00
parent 6172a9ca2d
commit 3df7921fdc

View File

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