Avoid panicing if cmd.Start() from container.createCmd() failed (#305)

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickaël Laventure 2016-08-26 10:56:18 -07:00 committed by Michael Crosby
parent 403ccb155b
commit 526a861988

View file

@ -297,7 +297,9 @@ func (p *process) Start() error {
}
case <-p.cmdDoneCh:
if !p.cmdSuccess {
if cmd.Process != nil {
cmd.Process.Kill()
}
cmd.Wait()
return ErrShimExited
}