From e21c6474901e3d12560eb389597e88b47fd46be5 Mon Sep 17 00:00:00 2001
From: lifeng68 <lifeng68@huawei.com>
Date: Fri, 11 Sep 2020 10:05:04 +0800
Subject: [PATCH 6/6] SIGTERM: do not catch signal SIGTERM in [lxc monitor]

Signed-off-by: lifeng68 <lifeng68@huawei.com>
---
 src/lxc/attach.c | 2 +-
 src/lxc/start.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/attach.c b/src/lxc/attach.c
index b33ff6325..72b3055c7 100644
--- a/src/lxc/attach.c
+++ b/src/lxc/attach.c
@@ -1228,7 +1228,7 @@ static int isulad_setup_signal_fd(sigset_t *oldmask)
 {
 	int ret;
 	sigset_t mask;
-	const int signals[] = {SIGBUS, SIGILL, SIGSEGV, SIGWINCH};
+	const int signals[] = {SIGBUS, SIGILL, SIGSEGV, SIGWINCH, SIGTERM};
 
 	/* Block everything except serious error signals. */
 	ret = sigfillset(&mask);
diff --git a/src/lxc/start.c b/src/lxc/start.c
index ab47420f1..50a1a8203 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -294,7 +294,7 @@ static int setup_signal_fd(sigset_t *oldmask)
 {
 	int ret;
 	sigset_t mask;
-	const int signals[] = {SIGBUS, SIGILL, SIGSEGV, SIGWINCH};
+	const int signals[] = {SIGBUS, SIGILL, SIGSEGV, SIGWINCH, SIGTERM};
 
 	/* Block everything except serious error signals. */
 	ret = sigfillset(&mask);
-- 
2.25.1

