From 43331921b0c1442cf787430ff49d3c77978826aa Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Sun, 23 Mar 2014 20:42:29 -0700 Subject: [PATCH] Beam: don't close the attachment FD when closing superfluous FDs Docker-DCO-1.1-Signed-off-by: Solomon Hykes (github: shykes) --- beam/unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beam/unix.go b/beam/unix.go index 42358dc..7dfff8a 100644 --- a/beam/unix.go +++ b/beam/unix.go @@ -55,7 +55,7 @@ func Receive(conn *net.UnixConn) (rdata []byte, rf *os.File, rerr error) { } var f *os.File if len(fds) > 1 { - for _, fd := range fds { + for _, fd := range fds[1:] { syscall.Close(fd) } }