summaryrefslogtreecommitdiff
path: root/execdriver/native/term.go
diff options
context:
space:
mode:
Diffstat (limited to 'execdriver/native/term.go')
-rw-r--r--execdriver/native/term.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/execdriver/native/term.go b/execdriver/native/term.go
deleted file mode 100644
index ec69820f75..0000000000
--- a/execdriver/native/term.go
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- These types are wrappers around the libcontainer Terminal interface so that
- we can resuse the docker implementations where possible.
-*/
-package native
-
-import (
- "github.com/dotcloud/docker/execdriver"
- "io"
- "os"
- "os/exec"
-)
-
-type dockerStdTerm struct {
- execdriver.StdConsole
- pipes *execdriver.Pipes
-}
-
-func (d *dockerStdTerm) Attach(cmd *exec.Cmd) error {
- return d.AttachPipes(cmd, d.pipes)
-}
-
-func (d *dockerStdTerm) SetMaster(master *os.File) {
- // do nothing
-}
-
-type dockerTtyTerm struct {
- execdriver.TtyConsole
- pipes *execdriver.Pipes
-}
-
-func (t *dockerTtyTerm) Attach(cmd *exec.Cmd) error {
- 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) {
- t.MasterPty = master
-}