gazelle/0074-The-call-stack-is-not-printed-in-the-proactive-exit-.patch
yinbin 79980c367d sync upstream patch
(cherry picked from commit 377d2a41acacfae6d887d58dc7c63224bfdee54b)
2023-12-11 09:57:00 +08:00

29 lines
905 B
Diff

From ef311f5a6c9d9c3578db836d68a3ad15727bdc15 Mon Sep 17 00:00:00 2001
From: wuchangye <wuchangye@huawei.com>
Date: Thu, 7 Dec 2023 14:17:49 +0800
Subject: [PATCH] The call stack is not printed in the proactive exit scenario.
---
src/lstack/api/lstack_signal.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/lstack/api/lstack_signal.c b/src/lstack/api/lstack_signal.c
index 03118f5..285aaf3 100644
--- a/src/lstack/api/lstack_signal.c
+++ b/src/lstack/api/lstack_signal.c
@@ -64,7 +64,10 @@ static void lstack_sig_default_handler(int sig)
dpdk_kni_release();
}
control_fd_close();
- dump_stack();
+ /* When operations such as pressing Ctrl+C or Kill, the call stack exit is not displayed. */
+ if (sig != SIGINT && sig != SIGTERM && sig != SIGKILL) {
+ dump_stack();
+ }
lwip_exit();
(void)kill(getpid(), sig);
}
--
2.27.0