libct/(*setnsProcess).Start: use retErr

It is not a good practice to have the name `err` for the error returned
by a function.  Switch to `retErr`.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2020-09-29 18:38:31 -07:00
parent 49d4507c77
commit 8699596dce
+3 -3
View File
@@ -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 {