Skip to content

Commit 900f0d4

Browse files
Merge pull request #2774 from Random-Liu/cherrypick-#2769-release-1.1
[release/1.1] cherry-pick: enhance: update v1/v2 runtime
2 parents a7dff7e + 665815b commit 900f0d4

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

linux/shim/service.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,19 @@ func (s *Service) processExits() {
451451
}
452452
}
453453

454-
func (s *Service) checkProcesses(e runc.Exit) {
454+
func (s *Service) allProcesses() []proc.Process {
455455
s.mu.Lock()
456456
defer s.mu.Unlock()
457+
458+
res := make([]proc.Process, 0, len(s.processes))
457459
for _, p := range s.processes {
460+
res = append(res, p)
461+
}
462+
return res
463+
}
464+
465+
func (s *Service) checkProcesses(e runc.Exit) {
466+
for _, p := range s.allProcesses() {
458467
if p.Pid() == e.Pid {
459468
if ip, ok := p.(*proc.Init); ok {
460469
// Ensure all children are killed

0 commit comments

Comments
 (0)