mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-12-24 23:49:12 +08:00
- cli-plugins: move socket code into common package
- cli-plugins: don't use abstract sockets on macOS
- fixes CLI leaving behind plugin socket mount-points
- socket: return from loop after EOF
full diff: https://github.com/docker/cli/compare/v25.0.0-rc.1...v25.0.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
20 lines
404 B
Go
20 lines
404 B
Go
//go:build !darwin
|
|
|
|
package socket
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
func listen(socketname string) (*net.UnixListener, error) {
|
|
return net.ListenUnix("unix", &net.UnixAddr{
|
|
Name: "@" + socketname,
|
|
Net: "unix",
|
|
})
|
|
}
|
|
|
|
func onAccept(conn *net.UnixConn, listener *net.UnixListener) {
|
|
// do nothing
|
|
// while on darwin we would unlink here; on non-darwin the socket is abstract and not present on the filesystem
|
|
}
|