Close the inherited socket fd
containerd-shim has dup the fd 3, and it don't need fd 3 any more.
@@ -196,7 +196,9 @@ func serve(ctx context.Context, server *ttrpc.Server, path string) error {
err error
)
if path == "" {
- l, err = net.FileListener(os.NewFile(3, "socket"))
+ f := os.NewFile(3, "socket")
+ l, err = net.FileListener(f)
+ f.Close()
path = "[inherited from parent]"
} else {
if len(path) > 106 {
