From 5fa863a6ea74ed24cfcc0c16eaa5e5a4e77387ec Mon Sep 17 00:00:00 2001 From: jingrui Date: Wed, 26 Dec 2018 12:08:20 +0800 Subject: [PATCH 04/27] runv: vendor: runv compatibility reason: fix manslaughter of runtime delete process cherry-pick from containerd-0.2.8 reference: 7906753998667b5a9fa9a996f4a0e41d4736d5c1 contaierd-17: fix manslaughter of runtime delete process fix manslaughter of runtime delete process f82956a89ca7d7cea3bdd5fcd4d4fd70c313f378 containerd-17: fix qemu remaining when dockerd restart fix qemu remaining when dockerd restart and container start concurrency Change-Id: Id23456e90961041194c946a289ae790327b874c8 Signed-off-by: jingrui --- vendor/github.com/containerd/go-runc/command_linux.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vendor/github.com/containerd/go-runc/command_linux.go b/vendor/github.com/containerd/go-runc/command_linux.go index 71b52f9..6ad27be 100644 --- a/vendor/github.com/containerd/go-runc/command_linux.go +++ b/vendor/github.com/containerd/go-runc/command_linux.go @@ -20,9 +20,17 @@ import ( "context" "os" "os/exec" + "strings" "syscall" ) +func (r *Runc) isrunv() bool { + if strings.Contains(r.Command, "runv") { + return true + } + return false +} + func (r *Runc) command(context context.Context, args ...string) *exec.Cmd { command := r.Command if command == "" { @@ -33,7 +41,7 @@ func (r *Runc) command(context context.Context, args ...string) *exec.Cmd { Setpgid: r.Setpgid, } cmd.Env = os.Environ() - if r.PdeathSignal != 0 { + if r.PdeathSignal != 0 && !r.isrunv() { cmd.SysProcAttr.Pdeathsig = r.PdeathSignal } -- 2.7.4.3