From 56cf7be3345925fd39f0a3847172c2dda0e6ad9d Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 3 Jan 2014 18:07:43 -0800 Subject: [PATCH] Allow fd:// like unix:// and tcp:// Somthing like 20605eb310f0b57bd06eea80ec63c5022fc83bde Docker-DCO-1.1-Signed-off-by: Brandon Philips (github: philips) --- systemd/listendfd.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/systemd/listendfd.go b/systemd/listendfd.go index a8fdb09..08070b6 100644 --- a/systemd/listendfd.go +++ b/systemd/listendfd.go @@ -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) {