setupIO: simplify code

There's no need to check err for nil.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-01-07 13:33:41 -08:00
parent 24c05b71fa
commit 719d70d2e3
+1 -4
View File
@@ -164,10 +164,7 @@ func setupIO(process *libcontainer.Process, rootuid, rootgid int, createTTY, det
t.postStart = append(t.postStart, parent, child)
t.consoleC = make(chan error, 1)
go func() {
if err := t.recvtty(process, parent); err != nil {
t.consoleC <- err
}
t.consoleC <- nil
t.consoleC <- t.recvtty(process, parent)
}()
} else {
// the caller of runc will handle receiving the console master