commit 262a2512f1409e908369307928b74c320fe33bc2
parent ce360e15d6886176693f6bce8333e078180c6705
Author: Joris Vink <joris@coders.se>
Date: Fri, 16 Oct 2020 13:06:08 +0200
Do not dispatch signals to workers without a valid pid.
thanks rille.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/worker.c b/src/worker.c
@@ -271,6 +271,10 @@ kore_worker_dispatch_signal(int sig)
for (idx = 0; idx < worker_count; idx++) {
kw = WORKER(idx);
+
+ if (kw->pid == -1 || kw->pid == 0)
+ continue;
+
if (kill(kw->pid, sig) == -1) {
kore_debug("kill(%d, %d): %s", kw->pid, sig, errno_s);
}