Minor cleanup
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
This commit is contained in:
parent
b2e01cbe8c
commit
41696722fa
1 changed files with 3 additions and 2 deletions
|
@ -56,11 +56,12 @@ func execCommand(container *libcontainer.Container, args []string) (int, error)
|
|||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
sendVethName(vethPair, w)
|
||||
sendVethName(w, vethPair)
|
||||
}
|
||||
|
||||
// Sync with child
|
||||
w.Close()
|
||||
r.Close()
|
||||
|
||||
go io.Copy(os.Stdout, master)
|
||||
go io.Copy(master, os.Stdin)
|
||||
|
@ -82,7 +83,7 @@ func execCommand(container *libcontainer.Container, args []string) (int, error)
|
|||
|
||||
// sendVethName writes the veth pair name to the child's stdin then closes the
|
||||
// pipe so that the child stops waiting for more data
|
||||
func sendVethName(name string, pipe io.WriteCloser) {
|
||||
func sendVethName(pipe io.Writer, name string) {
|
||||
fmt.Fprint(pipe, name)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue