tty: rm inheritStdio return value

Since commit eebdb644f9 this function never returns any error.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-11-29 19:35:19 -08:00
parent d23b810927
commit e63186351b
2 changed files with 2 additions and 5 deletions
+1 -2
View File
@@ -63,11 +63,10 @@ func setupProcessPipes(p *libcontainer.Process, rootuid, rootgid int) (*tty, err
return t, nil
}
func inheritStdio(process *libcontainer.Process) error {
func inheritStdio(process *libcontainer.Process) {
process.Stdin = os.Stdin
process.Stdout = os.Stdout
process.Stderr = os.Stderr
return nil
}
func (t *tty) initHostConsole() error {
+1 -3
View File
@@ -164,9 +164,7 @@ func setupIO(process *libcontainer.Process, rootuid, rootgid int, createTTY, det
// when runc will detach the caller provides the stdio to runc via runc's 0,1,2
// and the container's process inherits runc's stdio.
if detach {
if err := inheritStdio(process); err != nil {
return nil, err
}
inheritStdio(process)
return &tty{}, nil
}
return setupProcessPipes(process, rootuid, rootgid)