Skip to content

Commit 57fbb16

Browse files
Merge pull request #3149 from lifubang/pidnamespace
fix killall when use pidnamespace
2 parents 0485499 + 8722966 commit 57fbb16

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

runtime/v1/shim/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ func shouldKillAllOnExit(bundlePath string) (bool, error) {
554554

555555
if bundleSpec.Linux != nil {
556556
for _, ns := range bundleSpec.Linux.Namespaces {
557-
if ns.Type == specs.PIDNamespace {
557+
if ns.Type == specs.PIDNamespace && ns.Path == "" {
558558
return false, nil
559559
}
560560
}

runtime/v2/runc/v2/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ func shouldKillAllOnExit(bundlePath string) (bool, error) {
658658

659659
if bundleSpec.Linux != nil {
660660
for _, ns := range bundleSpec.Linux.Namespaces {
661-
if ns.Type == specs.PIDNamespace {
661+
if ns.Type == specs.PIDNamespace && ns.Path == "" {
662662
return false, nil
663663
}
664664
}

0 commit comments

Comments
 (0)