Beam: fix bug in beamsh which 'swapped' FDs because of underlying implementation of net.FileConn

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
This commit is contained in:
Solomon Hykes 2014-03-23 20:45:44 -07:00
parent b56b399238
commit b1090576ae
2 changed files with 4 additions and 1 deletions

View file

@ -67,8 +67,10 @@ func CmdCat(args []string, f *os.File) {
func CmdEcho(args []string, f *os.File) {
resp, err := beam.FdConn(int(f.Fd()))
if err != nil {
Fatal(err)
return
}
defer resp.Close()
r, w, err := os.Pipe()
if err != nil {
return