This commit is contained in:
crusader 2017-10-27 11:16:09 +09:00
parent 6762d7f872
commit 1a1a4b7ff9

View File

@ -2,13 +2,17 @@ package ipc
import ( import (
"net" "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) //sh.path = filepath.Join(os.TempDir(), sh.Addr)
// os.Remove(sh.path) // 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() { func (sh *ServerHandlers) Stopped() {