summaryrefslogtreecommitdiff
path: root/shaping/src/main.cpp
diff options
context:
space:
mode:
authorroot <[email protected]>2024-02-05 03:26:26 +0000
committerroot <[email protected]>2024-02-05 03:26:26 +0000
commitbe8e1d87cb8993c4df7054ec0205c60473c23f41 (patch)
tree16f66e90d68d25370e3460e4e4e476593e92f20b /shaping/src/main.cpp
parentf711e8a81c8888119b20e1a47aca95a62517debf (diff)
bugfix: 对于fair-share和split-by类型的profile,也需要等一次consume命令执行完,才执行下一次
Diffstat (limited to 'shaping/src/main.cpp')
-rw-r--r--shaping/src/main.cpp4
1 files changed, 2 insertions, 2 deletions
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();