diff --git a/runtime/v1/shim/service.go b/runtime/v1/shim/service.go index 4d2578ad0..af4ffe1e9 100644 --- a/runtime/v1/shim/service.go +++ b/runtime/v1/shim/service.go @@ -554,7 +554,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 } } diff --git a/runtime/v2/runc/v2/service.go b/runtime/v2/runc/v2/service.go index dd88954d5..9fc2d1b9d 100644 --- a/runtime/v2/runc/v2/service.go +++ b/runtime/v2/runc/v2/service.go @@ -658,7 +658,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 } }