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)