execution: "restore" container on service creation

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-12-15 10:40:24 -08:00
parent 73cb78fae3
commit 0fdd2469f6
8 changed files with 90 additions and 36 deletions

View file

@ -42,6 +42,12 @@ func (c *Container) ID() string {
}
func (c *Container) Status() Status {
for _, p := range c.processes {
if p.Pid() == c.initPid {
c.status = p.Status()
break
}
}
return c.status
}