containerd / continuity

A transport-agnostic, filesystem metadata manifest system
https://containerd.io
Apache License 2.0
141 stars 67 forks source link

fstest: have CreateSocket actually create a socket #143

Closed tiborvass closed 5 years ago

tiborvass commented 5 years ago

Using syscall package to create socket file, because net.Listen's Close() method removes the socket file and not closing the listener would result in leaking an fd.

Signed-off-by: Tibor Vass tibor@docker.com

Ping @ijc @dmcgowan

More discussion is needed to know how to deal with sockets in continuity but I don't want that to hold back this PR. For the record, in BuildKit we think it is better to convert it to a regular empty file, as both for regular and socket file types, the existence of the file should cause errors when trying to bind to it again. Creating a regular file ensures a more consistent behavior of programs in that matter.

tiborvass commented 5 years ago

Ping @crosbymichael

crosbymichael commented 5 years ago

LGTM