We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31e63fc commit e63f992Copy full SHA for e63f992
rpc/ipc_unix.go
@@ -25,14 +25,16 @@ import (
25
"net"
26
"os"
27
"path/filepath"
28
+ "syscall"
29
30
"github.com/ethereum/go-ethereum/log"
31
)
32
33
const (
- // On Linux, sun_path is 108 bytes in size
34
- // see http://man7.org/linux/man-pages/man7/unix.7.html
35
- maxPathSize = int(108)
+ // The limit of unix domain socket path diverse between OS, on Darwin it's 104 bytes
+ // but on Linux it's 108 byte, so we should depend on syscall.RawSockaddrUnix's
36
+ // definition dynamically
37
+ maxPathSize = len(syscall.RawSockaddrUnix{}.Path)
38
39
40
// ipcListen will create a Unix socket on the given endpoint.
0 commit comments