Move Exec creation to init process

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-11-09 11:20:58 -05:00
parent 6e25898ff0
commit 1fe5a251c4
5 changed files with 35 additions and 37 deletions

View File

@@ -218,7 +218,7 @@ func (s *Service) Exec(ctx context.Context, r *shimapi.ExecProcessRequest) (*goo
return nil, errdefs.ToGRPCf(errdefs.ErrFailedPrecondition, "container must be created")
}
process, err := proc.NewExec(ctx, s.config.Path, r, p.(*proc.Init), r.ID)
process, err := p.(*proc.Init).Exec(ctx, s.config.Path, r)
if err != nil {
return nil, errdefs.ToGRPC(err)
}