From 4d56be89dddad5364a24a733d3a1ed0914c8b85e 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) Upstream-commit: 07c03944ffc5010ae0300bfd794c79f44e1637d4 Component: engine --- components/engine/pkg/beam/unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/pkg/beam/unix.go b/components/engine/pkg/beam/unix.go index 42358dcd53..7dfff8a1ac 100644 --- a/components/engine/pkg/beam/unix.go +++ b/components/engine/pkg/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) } }