From f885f8407ad1778d172b16438a7c3a86a0033089 Mon Sep 17 00:00:00 2001 From: lifeng68 Date: Fri, 11 Sep 2020 10:11:35 +0800 Subject: [PATCH] lxc: do not catch SIGTERM in lxc monitor Signed-off-by: lifeng68 --- ...-catch-signal-SIGTERM-in-lxc-monitor.patch | 40 +++++++++++++++++++ lxc.spec | 17 +++++++- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 0006-SIGTERM-do-not-catch-signal-SIGTERM-in-lxc-monitor.patch diff --git a/0006-SIGTERM-do-not-catch-signal-SIGTERM-in-lxc-monitor.patch b/0006-SIGTERM-do-not-catch-signal-SIGTERM-in-lxc-monitor.patch new file mode 100644 index 0000000..b4cb023 --- /dev/null +++ b/0006-SIGTERM-do-not-catch-signal-SIGTERM-in-lxc-monitor.patch @@ -0,0 +1,40 @@ +From e21c6474901e3d12560eb389597e88b47fd46be5 Mon Sep 17 00:00:00 2001 +From: lifeng68 +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 +--- + 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 + diff --git a/lxc.spec b/lxc.spec index b1ce72a..4d21287 100644 --- a/lxc.spec +++ b/lxc.spec @@ -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) @@ -184,7 +185,19 @@ make check %{_mandir}/*/man7/%{name}* %changelog -* Fri Sep 04 2020 zhangxiaoyu - 4.0.3-2020090101 +* Fri Sep 11 2020 openEuler Buildteam - 4.0.3-2020091101 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: modify source0 address + +* Wed Sep 02 2020 openEuler Buildteam - 4.0.3-2020090101 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: modify source0 address + +* Mon Aug 03 2020 openEuler Buildteam - 4.0.3-2020080301 - Type:enhancement - ID:NA - SUG:NA -- Gitee