Close the inherited socket fd
containerd-shim has dup the fd 3, and it don't need fd 3 any more. Signed-off-by: Shukui Yang <keloyangsk@gmail.com>
This commit is contained in:
parent
111b082e20
commit
ec78305c49
@ -196,7 +196,9 @@ func serve(ctx context.Context, server *ttrpc.Server, path string) error {
|
|||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
if path == "" {
|
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]"
|
path = "[inherited from parent]"
|
||||||
} else {
|
} else {
|
||||||
if len(path) > 106 {
|
if len(path) > 106 {
|
||||||
|
Loading…
Reference in New Issue
Block a user