MCPcopy
hub / github.com/opencontainers/runc / bindSocket

Method bindSocket

notify_socket.go:62–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60}
61
62func (s *notifySocket) bindSocket() error {
63 addr := net.UnixAddr{
64 Name: s.socketPath,
65 Net: "unixgram",
66 }
67
68 socket, err := net.ListenUnixgram("unixgram", &addr)
69 if err != nil {
70 return err
71 }
72
73 err = os.Chmod(s.socketPath, 0o777)
74 if err != nil {
75 socket.Close()
76 return err
77 }
78
79 s.socket = socket
80 return nil
81}
82
83func (s *notifySocket) setupSocketDirectory() error {
84 return os.Mkdir(path.Dir(s.socketPath), 0o755)

Callers 2

startContainerFunction · 0.80
notifySocketStartFunction · 0.80

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected