lxc: do not catch SIGTERM in lxc monitor

Signed-off-by: lifeng68 <lifeng68@huawei.com>
This commit is contained in:
lifeng68 2020-09-11 10:11:35 +08:00
parent 0b120ce827
commit 589cc90226
2 changed files with 48 additions and 1 deletions

View File

@ -0,0 +1,40 @@
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

View File

@ -1,4 +1,4 @@
%global _release 2020090101
%global _release 2020091101
Name: lxc
Version: 4.0.3
@ -12,6 +12,7 @@ Patch9002: 0002-add-mount-label-for-rootfs.patch
Patch9003: 0003-format-code-and-verify-mount-mode.patch
Patch9004: 0004-Removes-the-definition-of-the-thread-attributes-obje.patch
Patch9005: 0005-solve-coredump-bug-caused-by-fstype-being-NULL-durin.patch
Patch9006: 0006-SIGTERM-do-not-catch-signal-SIGTERM-in-lxc-monitor.patch
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
BuildRequires: pkgconfig(libseccomp)
@ -183,6 +184,12 @@ make check
%{_mandir}/*/man7/%{name}*
%changelog
* Fri Sep 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.3-2020091101
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: modify source0 address
* Wed Sep 02 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.0.3-2020090101
- Type:enhancement
- ID:NA