diff options
| author | 2021-11-27 09:05:43 -0600 | |
|---|---|---|
| committer | 2021-11-27 09:05:43 -0600 | |
| commit | 3df7921fdc2f78a08ddd4000dd65c6c8c0f505bb (patch) | |
| tree | 63d2585f4ad0580835e0636fa448cecbbaeb8833 | |
| parent | Merge branch 'master' of github.com:janet-lang/janet (diff) | |
Don't call wait twice when closing or gcing.
| -rw-r--r-- | src/core/os.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/os.c b/src/core/os.c index b675c635..bd99bc3a 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -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; |
