Fix attach to old running container after restart

Get the control pipe of old running container on
containerd restarting.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
Lei Jitang 2016-07-04 04:12:51 -04:00
parent 1b3a81545c
commit bce8df5498

View file

@ -132,6 +132,13 @@ func loadProcess(root, id string, c *container, s *ProcessState) (*process, erro
return nil, err
}
p.exitPipe = exit
control, err := getControlPipe(filepath.Join(root, ControlFile))
if err != nil {
return nil, err
}
p.controlPipe = control
return p, nil
}
return nil, err