mirror of https://github.com/docker/docs.git
Fix tty copy for driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
fac41af25b
commit
172260a49b
|
@ -8,6 +8,7 @@ import (
|
||||||
"github.com/dotcloud/docker/execdriver/lxc"
|
"github.com/dotcloud/docker/execdriver/lxc"
|
||||||
"github.com/dotcloud/docker/pkg/libcontainer"
|
"github.com/dotcloud/docker/pkg/libcontainer"
|
||||||
"github.com/dotcloud/docker/pkg/libcontainer/nsinit"
|
"github.com/dotcloud/docker/pkg/libcontainer/nsinit"
|
||||||
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
@ -203,7 +204,11 @@ type dockerTtyTerm struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *dockerTtyTerm) Attach(cmd *exec.Cmd) error {
|
func (t *dockerTtyTerm) Attach(cmd *exec.Cmd) error {
|
||||||
return t.AttachPipes(cmd, t.pipes)
|
go io.Copy(t.pipes.Stdout, t.MasterPty)
|
||||||
|
if t.pipes.Stdin != nil {
|
||||||
|
go io.Copy(t.MasterPty, t.pipes.Stdin)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *dockerTtyTerm) SetMaster(master *os.File) {
|
func (t *dockerTtyTerm) SetMaster(master *os.File) {
|
||||||
|
|
Loading…
Reference in New Issue