From 1a1a4b7ff913450e7cb993fba054d7271f5d49e1 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 27 Oct 2017 11:16:09 +0900 Subject: [PATCH] ing --- ipc/ipc_unix.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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() {