Sync container start
This commit is contained in:
parent
e81513349f
commit
86ec7e8fd2
7 changed files with 50 additions and 81 deletions
|
@ -173,6 +173,10 @@ func (c *libcontainerContainer) Pid() (int, error) {
|
|||
return c.initProcess.Pid()
|
||||
}
|
||||
|
||||
func (c *libcontainerContainer) Start() error {
|
||||
return c.c.Start(c.initProcess)
|
||||
}
|
||||
|
||||
func (c *libcontainerContainer) SetExited(status int) {
|
||||
c.exitStatus = status
|
||||
// meh
|
||||
|
@ -222,10 +226,6 @@ func (r *libcontainerRuntime) Create(id, bundlePath string) (Container, error) {
|
|||
c: container,
|
||||
initProcess: process,
|
||||
}
|
||||
if err := container.Start(process); err != nil {
|
||||
container.Destroy()
|
||||
return nil, err
|
||||
}
|
||||
return c, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue