Handle ECHILD when reaping workers on shutdown.

If the child process is already dead we must handle it accordingly
instead of getting stuck waiting on it.
This commit is contained in:
Joris Vink 2022-02-16 12:32:20 +01:00
parent 23d762d682
commit 6dc162e7ee
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ kore_worker_shutdown(void)
if (kw->pid != 0) {
pid = waitpid(kw->pid, &status, 0);
if (pid == -1)
if (pid == -1 && errno != ECHILD)
continue;
#if defined(__linux__)