From fa5f744a790356472d4649b9ad1d955e36d0c7c0 Mon Sep 17 00:00:00 2001 From: Lifubang Date: Sat, 30 Mar 2019 11:36:56 +0800 Subject: [PATCH 1/2] fix shouldKillAllOnExit check Signed-off-by: Lifubang --- runtime/v1/shim/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/v1/shim/service.go b/runtime/v1/shim/service.go index 701dab435..56e7b74f3 100644 --- a/runtime/v1/shim/service.go +++ b/runtime/v1/shim/service.go @@ -546,7 +546,7 @@ func shouldKillAllOnExit(bundlePath string) (bool, error) { if bundleSpec.Linux != nil { for _, ns := range bundleSpec.Linux.Namespaces { - if ns.Type == specs.PIDNamespace { + if ns.Type == specs.PIDNamespace && ns.Path == "" { return false, nil } } From 872296642ac395acbc4344f529fcf4c6fddb5de2 Mon Sep 17 00:00:00 2001 From: Lifubang Date: Sat, 30 Mar 2019 11:37:14 +0800 Subject: [PATCH 2/2] fix shouldKillAllOnExit check for v2 Signed-off-by: Lifubang --- runtime/v2/runc/v2/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/v2/runc/v2/service.go b/runtime/v2/runc/v2/service.go index 7d71e9dfc..62bceac1e 100644 --- a/runtime/v2/runc/v2/service.go +++ b/runtime/v2/runc/v2/service.go @@ -661,7 +661,7 @@ func shouldKillAllOnExit(bundlePath string) (bool, error) { if bundleSpec.Linux != nil { for _, ns := range bundleSpec.Linux.Namespaces { - if ns.Type == specs.PIDNamespace { + if ns.Type == specs.PIDNamespace && ns.Path == "" { return false, nil } }