From 675d2d18a896aee1576a697fdacd6b1c067cbdad Mon Sep 17 00:00:00 2001 From: "xiang.zhou" Date: Tue, 5 Sep 2023 17:30:01 +0800 Subject: [PATCH] fixbug:send sigkill when stop timeout --- src/daemon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/daemon.c b/src/daemon.c index af70474a..d3569c64 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -35,7 +35,7 @@ #include "daemon.h" -#define STOP_TIMEOUT 20000 +#define STOP_TIMEOUT 10000 #define STOP_TICK 2000 void daemonize() @@ -205,6 +205,10 @@ int neuron_stop() if (0 == kill((pid_t)(-gid), SIGINT)) { if (neuron_wait_exit(STOP_TIMEOUT) == 0) { ret = 0; + } else { + if (0 == kill((pid_t)(-gid), SIGKILL)) { + ret = 0; + } } } else { nlog_error("cannot kill gpid:%ld reason: %s\n", (long) gid,