Allow fd:// like unix:// and tcp://

Somthing like 20605eb310f0b57bd06eea80ec63c5022fc83bde

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
This commit is contained in:
Brandon Philips 2014-01-03 18:07:43 -08:00
parent 8362e7cc10
commit 56cf7be334

View file

@ -17,6 +17,11 @@ func ListenFD(addr string) ([]net.Listener, error) {
return nil, errors.New("No sockets found")
}
// default to all fds just like unix:// and tcp://
if addr == "" {
addr = "*"
}
fdNum, _ := strconv.Atoi(addr)
fdOffset := fdNum - 3
if (addr != "*") && (len(files) < int(fdOffset)+1) {