36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From 036485b74b382574f1b88b10b5cfed5a0efb2562 Mon Sep 17 00:00:00 2001
|
|
From: yinbin <yinbin8@huawei.com>
|
|
Date: Thu, 2 Jan 2025 17:47:13 +0800
|
|
Subject: [PATCH] SIGNAL: Adjust hijack sigal table to hijack SIGABRT SIGQUIT
|
|
and delet SIGKILL
|
|
|
|
---
|
|
src/lstack/api/lstack_unistd.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/lstack/api/lstack_unistd.c b/src/lstack/api/lstack_unistd.c
|
|
index 90e603e..0837a6b 100644
|
|
--- a/src/lstack/api/lstack_unistd.c
|
|
+++ b/src/lstack/api/lstack_unistd.c
|
|
@@ -23,7 +23,7 @@
|
|
#include "lstack_control_plane.h"
|
|
#include "lstack_dump.h"
|
|
|
|
-static int g_hijack_signal[] = { SIGTERM, SIGINT, SIGSEGV, SIGBUS, SIGFPE, SIGILL, SIGKILL};
|
|
+static int g_hijack_signal[] = { SIGTERM, SIGINT, SIGSEGV, SIGBUS, SIGFPE, SIGILL, SIGABRT, SIGQUIT};
|
|
#define HIJACK_SIGNAL_COUNT (sizeof(g_hijack_signal) / sizeof(g_hijack_signal[0]))
|
|
|
|
static struct sigaction g_register_sigactions[NSIG]; // NSIG is the signal counts of system, normally equal 65 in Linux.
|
|
@@ -52,7 +52,7 @@ static inline bool match_hijack_signal(int sig)
|
|
/* When operations such as pressing Ctrl+C or Kill are executed, we don't need to dump the stack. */
|
|
bool sig_need_dump(int sig)
|
|
{
|
|
- if (sig == SIGINT || sig == SIGTERM || sig == SIGKILL) {
|
|
+ if (sig == SIGINT || sig == SIGTERM || sig == SIGQUIT) {
|
|
return false;
|
|
}
|
|
return true;
|
|
--
|
|
2.33.0
|
|
|