From be8e1d87cb8993c4df7054ec0205c60473c23f41 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 5 Feb 2024 03:26:26 +0000 Subject: bugfix: 对于fair-share和split-by类型的profile,也需要等一次consume命令执行完,才执行下一次 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shaping/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shaping/src/main.cpp') diff --git a/shaping/src/main.cpp b/shaping/src/main.cpp index d31f768..54e2f60 100644 --- a/shaping/src/main.cpp +++ b/shaping/src/main.cpp @@ -58,7 +58,7 @@ static void sig_handler(int signo) swarmkv_reload_log_level(); } - if (signo == SIGQUIT) { + if (signo == SIGQUIT || signo == SIGTERM) { quit = 1; } @@ -82,7 +82,7 @@ int main(int argc, char **argv) return -1; } - if (signal(SIGQUIT, sig_handler) == SIG_ERR) + if (signal(SIGQUIT, sig_handler) == SIG_ERR || signal(SIGTERM, sig_handler) == SIG_ERR) { LOG_ERROR("%s: unable to register SIGQUIT signal handler, error %d: %s", LOG_TAG_SHAPING, errno, strerror(errno)); LOG_CLOSE(); -- cgit v1.2.3