mirror of
https://github.com/jorisvink/kore
synced 2025-03-10 04:59:02 -04:00
Improve waiting on children to exit.
If waitpid() returns -1 check if errno is ECHILD, just mark the worker process as exited. This could happen if Kore starts without keymgr/acme but those would still be accounted for.
This commit is contained in:
parent
445163f7c5
commit
d8ff8e2c18
@ -223,8 +223,11 @@ kore_worker_shutdown(void)
|
||||
kw = WORKER(idx);
|
||||
if (kw->pid != 0) {
|
||||
pid = waitpid(kw->pid, &status, 0);
|
||||
if (pid == -1)
|
||||
if (pid == -1) {
|
||||
if (errno == ECHILD)
|
||||
kw->pid = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
#if defined(__linux__)
|
||||
kore_seccomp_trace(kw->pid, status);
|
||||
|
Loading…
x
Reference in New Issue
Block a user