Fix container pid.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-11-27 15:29:44 -08:00
parent 3a31ce267d
commit a6b6097c90
5 changed files with 54 additions and 20 deletions

View File

@@ -147,9 +147,6 @@ func (s *createdCheckpointState) Start(ctx context.Context) error {
p := s.p
sio := p.stdio
p.pid.Lock()
defer p.pid.Unlock()
var (
err error
socket *runc.Socket
@@ -189,7 +186,7 @@ func (s *createdCheckpointState) Start(ctx context.Context) error {
if err != nil {
return errors.Wrap(err, "failed to retrieve OCI runtime container pid")
}
p.pid.pid = pid
p.pid = pid
return s.transition("running")
}