diff --git a/ipc/ipc_unix.go b/ipc/ipc_unix.go index 3e479fe..7a468a0 100644 --- a/ipc/ipc_unix.go +++ b/ipc/ipc_unix.go @@ -2,13 +2,17 @@ package ipc import ( "net" + "os" ) -func (sh *ServerHandlers) Listen() (net.Listener, error) { +func (sh *ServerHandlers) Listen() (l net.Listener, err error) { //sh.path = filepath.Join(os.TempDir(), sh.Addr) // os.Remove(sh.path) + l, err = net.ListenUnix("unix", &net.UnixAddr{Name: sh.Addr, Net: "unix"}) - return net.ListenUnix("unix", &net.UnixAddr{Name: sh.Addr, Net: "unix"}) + os.Chmod(sh.Addr, 0700) + + return } func (sh *ServerHandlers) Stopped() {