We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f67e54 + 905ab8f commit 894a5e0Copy full SHA for 894a5e0
rpc/ipc_unix.go
@@ -25,14 +25,16 @@ import (
25
"net"
26
"os"
27
"path/filepath"
28
+ "syscall"
29
30
"github.com/CortexFoundation/CortexTheseus/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