Browse code

Pass tty master to Exec Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)

Michael Crosby authored on 2014/02/22 09:40:32
Showing 2 changed files
... ...
@@ -19,9 +19,8 @@ import (
19 19
 
20 20
 // Exec performes setup outside of a namespace so that a container can be
21 21
 // executed.  Exec is a high level function for working with container namespaces.
22
-func Exec(container *libcontainer.Container, stdin io.Reader, stdout, stderr io.Writer, logFile string, args []string) (int, error) {
22
+func Exec(container *libcontainer.Container, stdin io.Reader, stdout, stderr io.Writer, master *os.File, logFile string, args []string) (int, error) {
23 23
 	var (
24
-		master  *os.File
25 24
 		console string
26 25
 		err     error
27 26
 
... ...
@@ -58,7 +58,7 @@ func main() {
58 58
 			exitCode, err = nsinit.ExecIn(container, nspid, flag.Args()[1:])
59 59
 		} else {
60 60
 			exitCode, err = nsinit.Exec(container,
61
-				os.Stdin, os.Stdout, os.Stderr,
61
+				os.Stdin, os.Stdout, os.Stderr, nil,
62 62
 				logFile, flag.Args()[1:])
63 63
 		}
64 64
 		if err != nil {