From 021fd05218403d9a26ecf117ce54cf4bccdddb4f 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) --- unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix.go b/unix.go index 42358dcd53..7dfff8a1ac 100644 --- a/unix.go +++ b/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) } }