Browse code

Minor cleanup

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)

Guillaume J. Charmes authored on 2014/02/21 10:59:08
Showing 1 changed files
... ...
@@ -56,11 +56,12 @@ func execCommand(container *libcontainer.Container, args []string) (int, error)
56 56
 		if err != nil {
57 57
 			return -1, err
58 58
 		}
59
-		sendVethName(vethPair, w)
59
+		sendVethName(w, vethPair)
60 60
 	}
61 61
 
62 62
 	// Sync with child
63 63
 	w.Close()
64
+	r.Close()
64 65
 
65 66
 	go io.Copy(os.Stdout, master)
66 67
 	go io.Copy(master, os.Stdin)
... ...
@@ -82,7 +83,7 @@ func execCommand(container *libcontainer.Container, args []string) (int, error)
82 82
 
83 83
 // sendVethName writes the veth pair name to the child's stdin then closes the
84 84
 // pipe so that the child stops waiting for more data
85
-func sendVethName(name string, pipe io.WriteCloser) {
85
+func sendVethName(pipe io.Writer, name string) {
86 86
 	fmt.Fprint(pipe, name)
87 87
 }
88 88