kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 6dc162e7ee2724cabdcbfc93ccd25f696a83572f
parent 23d762d68237ec60c815250ca07d8f9a0f316840
Author: Joris Vink <joris@coders.se>
Date:   Wed, 16 Feb 2022 12:32:20 +0100

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.

Diffstat:
src/worker.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/worker.c b/src/worker.c @@ -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__)