oeAware-manager/0002-fix-threads-are-still-bound-after-systemctl-stop-oea.patch
fly_1997 d4398f6f54 fix coredump, add automatic startup based on the version and modify logger mode to append
(cherry picked from commit 31f94f11996a286e6ebb0997094a041411996e29)
2024-07-09 16:03:20 +08:00

27 lines
843 B
Diff

From ed8c8d44f05f7fd2160252cbe1b2d10cbd6000cf Mon Sep 17 00:00:00 2001
From: zhoukaiqi <zhoukaiqi@huawei.com>
Date: Sat, 6 Jul 2024 14:34:24 +0800
Subject: [PATCH 3/4] fix threads are still bound after systemctl stop oeaware
---
src/plugin_mgr/main.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/plugin_mgr/main.cpp b/src/plugin_mgr/main.cpp
index 5cfb020..9add8ac 100644
--- a/src/plugin_mgr/main.cpp
+++ b/src/plugin_mgr/main.cpp
@@ -39,7 +39,8 @@ void signal_handler(int signum) {
}
int main(int argc, char **argv) {
- signal(SIGINT, signal_handler);
+ signal(SIGINT, signal_handler); // ctrl + c
+ signal(SIGTERM, signal_handler); // systemctl stop
std::shared_ptr<Config> config = std::make_shared<Config>();
if (argc < 2) {
ERROR("System need a argument!");
--
2.33.0