Move exec and checkpoint to process state

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-02-11 11:30:25 -08:00
parent cf28969328
commit d317f71ac2
5 changed files with 26 additions and 31 deletions

View file

@ -150,7 +150,6 @@ func (c *container) Start(checkpoint string, s Stdio) (Process, error) {
return nil, err
}
cmd := exec.Command("containerd-shim",
"-checkpoint", checkpoint,
c.id, c.bundle,
)
cmd.Dir = processRoot
@ -162,6 +161,7 @@ func (c *container) Start(checkpoint string, s Stdio) (Process, error) {
return nil, err
}
config := &processConfig{
checkpoint: checkpoint,
root: processRoot,
id: InitProcessID,
c: c,
@ -189,7 +189,6 @@ func (c *container) Exec(pid string, spec specs.Process, s Stdio) (Process, erro
return nil, err
}
cmd := exec.Command("containerd-shim",
"-exec",
c.id, c.bundle,
)
cmd.Dir = processRoot
@ -197,6 +196,7 @@ func (c *container) Exec(pid string, spec specs.Process, s Stdio) (Process, erro
Setpgid: true,
}
config := &processConfig{
exec: true,
id: pid,
root: processRoot,
c: c,