lxc/0058-do-not-check-ppid-when-set-death-signal.patch
LiFeng 1e407c11a9 lxc: internal change
Signed-off-by: LiFeng <lifeng68@huawei.com>
2020-03-03 08:56:30 -05:00

37 lines
998 B
Diff

From 2c5d318fb3a809c017e0b57c80de500bceb9b495 Mon Sep 17 00:00:00 2001
From: tanyifeng <tanyifeng1@huawei.com>
Date: Tue, 12 Feb 2019 14:00:47 +0800
Subject: [PATCH 058/140] do not check ppid when set death signal
ppid will not be 0 if we shared host pid
Signed-off-by: tanyifeng <tanyifeng1@huawei.com>
Signed-off-by: LiFeng <lifeng68@huawei.com>
---
src/lxc/utils.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lxc/utils.c b/src/lxc/utils.c
index 9a50fce..0aa87aa 100644
--- a/src/lxc/utils.c
+++ b/src/lxc/utils.c
@@ -1722,12 +1722,13 @@ int lxc_set_death_signal(int signal, pid_t parent)
prctl_arg(0), prctl_arg(0));
/* Check whether we have been orphaned. */
- ppid = (pid_t)syscall(SYS_getppid);
+ /* isulad: delete this check, ppid will not be 0 if we shared host pid */
+ /*ppid = (pid_t)syscall(SYS_getppid);
if (ppid != parent) {
ret = raise(SIGKILL);
if (ret < 0)
return -1;
- }
+ }*/
if (ret < 0)
return -1;
--
1.8.3.1