diff --git a/libcontainer/process_linux.go b/libcontainer/process_linux.go index 2365d4e0f..81004046e 100644 --- a/libcontainer/process_linux.go +++ b/libcontainer/process_linux.go @@ -86,9 +86,9 @@ func (p *setnsProcess) signal(sig os.Signal) error { return unix.Kill(p.pid(), s) } -func (p *setnsProcess) start() (err error) { +func (p *setnsProcess) start() (retErr error) { defer p.messageSockPair.parent.Close() - err = p.cmd.Start() + err := p.cmd.Start() // close the write-side of the pipes (controlled by child) p.messageSockPair.child.Close() p.logFilePair.child.Close() @@ -100,7 +100,7 @@ func (p *setnsProcess) start() (err error) { return newSystemErrorWithCause(err, "copying bootstrap data to pipe") } } - if err = p.execSetns(); err != nil { + if err := p.execSetns(); err != nil { return newSystemErrorWithCause(err, "executing setns process") } if len(p.cgroupPaths) > 0 {