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.
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.
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.