Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
tty not required for setup
Browse files Browse the repository at this point in the history
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
  • Loading branch information
mrunalp committed Jan 15, 2015
1 parent 0c50197 commit 96e6ee6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions nsinit/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func startInExistingContainer(config *libcontainer.Config, state *libcontainer.S
)
signal.Notify(sigc)

if config.Tty {
if config.Tty && action != "setup" {
stdin = nil
stdout = nil
stderr = nil
Expand All @@ -97,14 +97,12 @@ func startInExistingContainer(config *libcontainer.Config, state *libcontainer.S
go io.Copy(master, os.Stdin)
go io.Copy(os.Stdout, master)

/*
state, err := term.SetRawTerminal(os.Stdin.Fd())
if err != nil {
return -1, err
}
state, err := term.SetRawTerminal(os.Stdin.Fd())
if err != nil {
return -1, err
}

defer term.RestoreTerminal(os.Stdin.Fd(), state)
*/
defer term.RestoreTerminal(os.Stdin.Fd(), state)
}

startCallback := func(cmd *exec.Cmd) {
Expand Down

0 comments on commit 96e6ee6

Please sign in to comment.