Skip to content

Commit

Permalink
Merge pull request #2774 from Random-Liu/cherrypick-#2769-release-1.1
Browse files Browse the repository at this point in the history
[release/1.1] cherry-pick: enhance: update v1/v2 runtime
  • Loading branch information
crosbymichael committed Nov 12, 2018
2 parents a7dff7e + 665815b commit 900f0d4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion linux/shim/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,19 @@ func (s *Service) processExits() {
}
}

func (s *Service) checkProcesses(e runc.Exit) {
func (s *Service) allProcesses() []proc.Process {
s.mu.Lock()
defer s.mu.Unlock()

res := make([]proc.Process, 0, len(s.processes))
for _, p := range s.processes {
res = append(res, p)
}
return res
}

func (s *Service) checkProcesses(e runc.Exit) {
for _, p := range s.allProcesses() {
if p.Pid() == e.Pid {
if ip, ok := p.(*proc.Init); ok {
// Ensure all children are killed
Expand Down

0 comments on commit 900f0d4

Please sign in to comment.