From e63186351b6eb9830c10a91b74e5ae54d9048859 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 29 Nov 2021 19:35:19 -0800 Subject: [PATCH] tty: rm inheritStdio return value Since commit eebdb644f924 this function never returns any error. Signed-off-by: Kir Kolyshkin --- tty.go | 3 +-- utils_linux.go | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tty.go b/tty.go index 10106a954..86fde2c06 100644 --- a/tty.go +++ b/tty.go @@ -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 { diff --git a/utils_linux.go b/utils_linux.go index 60e8d8b20..939e01f8d 100644 --- a/utils_linux.go +++ b/utils_linux.go @@ -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)