1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

13 commits

Author SHA1 Message Date
Solomon Hykes
bcd31405cf beam: fix FD leaks in SendPipe
This fixes file descriptor leaks in the SendPipe function.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:18 -07:00
Solomon Hykes
1737063904 beam: more hooks for interactive debugging
This inserts low-level hooks for interactive step-by-step debugging.
Hooks are triggered by setting the *TEST* environment variable.

This is particularly useful for tracking down file descriptor leaks,
double-closing, or other issues which are difficult to debug with
the usual toolbox.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:17 -07:00
Solomon Hykes
916372c76f Beam: remove leftover debugging messages
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:17 -07:00
Solomon Hykes
851c1b05d0 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)
2014-04-22 15:50:16 -07:00
Solomon Hykes
07c03944ff Beam: don't close the attachment FD when closing superfluous FDs
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:16 -07:00
Solomon Hykes
8875cdf561 Beam: debugging hooks for easy step-by-step inspection of the FD table
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:16 -07:00
Solomon Hykes
f94a18677a Beam: Send: pass the underlying error unchanged to allow io.EOF detection
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
59853c188d Beam: USocketPair returns a *net.UnixConn socket pair for convenience.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
c401c43cae Beam: fix file descriptor leaks
* Close all file descriptors successfully sent as attachment
* Close duplicate file descriptors created by net.FileCon and net.UnixConn.File

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00
Solomon Hykes
b637e5f04a Beam: change the prototype of SendPipe() to return a *net.UnixSocket
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:14 -07:00
Solomon Hykes
188c2ef806 Beam: allow sending messages without attachments.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:14 -07:00
Solomon Hykes
3960da04c8 Beam: convenience functions Listen and Connect
These convenience functions expose a familiar face to the unknown and bizarre world of beam networking.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:14 -07:00
Solomon Hykes
5957e6b385 Beam: a simple stream-oriented communication protocol for distributed systems.
This patch includes a stripped down implementation with a bare minimum
unix socket transport. It relies on fd passing for stream multiplexing.

The purpose of this first patch is to allow implementation of dynamic
linking, which will allow advanced service discovery.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:14 -07:00