Merge pull request #3149 from lifubang/pidnamespace

fix killall when use pidnamespace
This commit is contained in:
Michael Crosby 2019-05-09 14:28:44 -04:00 committed by GitHub
commit 57fbb16234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -554,7 +554,7 @@ func shouldKillAllOnExit(bundlePath string) (bool, error) {
if bundleSpec.Linux != nil { if bundleSpec.Linux != nil {
for _, ns := range bundleSpec.Linux.Namespaces { for _, ns := range bundleSpec.Linux.Namespaces {
if ns.Type == specs.PIDNamespace { if ns.Type == specs.PIDNamespace && ns.Path == "" {
return false, nil return false, nil
} }
} }

View File

@ -658,7 +658,7 @@ func shouldKillAllOnExit(bundlePath string) (bool, error) {
if bundleSpec.Linux != nil { if bundleSpec.Linux != nil {
for _, ns := range bundleSpec.Linux.Namespaces { for _, ns := range bundleSpec.Linux.Namespaces {
if ns.Type == specs.PIDNamespace { if ns.Type == specs.PIDNamespace && ns.Path == "" {
return false, nil return false, nil
} }
} }