From 526a861988e2bc60b36e990aebc79ced2b678d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kenfe-Micka=C3=ABl=20Laventure?= Date: Fri, 26 Aug 2016 10:56:18 -0700 Subject: [PATCH] Avoid panicing if `cmd.Start()` from `container.createCmd()` failed (#305) Signed-off-by: Kenfe-Mickael Laventure --- runtime/process.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/process.go b/runtime/process.go index eac5c3e..88f6d80 100644 --- a/runtime/process.go +++ b/runtime/process.go @@ -297,7 +297,9 @@ func (p *process) Start() error { } case <-p.cmdDoneCh: if !p.cmdSuccess { - cmd.Process.Kill() + if cmd.Process != nil { + cmd.Process.Kill() + } cmd.Wait() return ErrShimExited }