예제 #1
0
 def create_control_socket(self):
     dotxpra = DotXpra(self.socket_dir)
     name = "proxy-%s" % os.getpid()
     sockpath = dotxpra.norm_make_path(name, dotxpra.sockdir())
     state = dotxpra.get_server_state(sockpath)
     if state in (DotXpra.LIVE, DotXpra.UNKNOWN):
         log.warn("You already have a proxy server running at %s, the control socket will not be created!", sockpath)
         return False
     try:
         sock = create_unix_domain_socket(sockpath, None)
         sock.listen(5)
     except Exception, e:
         log.warn("failed to setup control socket %s: %s", sockpath, e)
         return False
예제 #2
0
 def create_control_socket(self):
     dotxpra = DotXpra(self.socket_dir)
     name = "proxy-%s" % os.getpid()
     sockpath = dotxpra.norm_make_path(name, dotxpra.sockdir())
     state = dotxpra.get_server_state(sockpath)
     if state in (DotXpra.LIVE, DotXpra.UNKNOWN):
         log.warn(
             "You already have a proxy server running at %s, the control socket will not be created!",
             sockpath)
         return False
     try:
         sock = create_unix_domain_socket(sockpath, None)
         sock.listen(5)
     except Exception, e:
         log.warn("failed to setup control socket %s: %s", sockpath, e)
         return False
예제 #3
0
 def create_control_socket(self):
     dotxpra = DotXpra(self.socket_dir)
     name = "proxy-%s" % os.getpid()
     sockpath = dotxpra.norm_make_path(name, dotxpra.sockdir())
     state = dotxpra.get_server_state(sockpath)
     if state in (DotXpra.LIVE, DotXpra.UNKNOWN):
         log.warn("You already have a proxy server running at %s, the control socket will not be created!", sockpath)
         return False
     try:
         sock = create_unix_domain_socket(sockpath, None, 0o600)
         sock.listen(5)
     except:
         log.warn("failed to setup control socket %s", sockpath, exc_info=True)
         return False
     self.control_socket = sock
     self.control_socket_path = sockpath
     log.info("proxy instance now also available using unix domain socket: %s", self.control_socket_path)
     return True
예제 #4
0
 def create_control_socket(self):
     dotxpra = DotXpra(self.socket_dir)
     name = "proxy-%s" % os.getpid()
     sockpath = dotxpra.norm_make_path(name, dotxpra.sockdir())
     state = dotxpra.get_server_state(sockpath)
     if state in (DotXpra.LIVE, DotXpra.UNKNOWN):
         log.warn(
             "You already have a proxy server running at %s, the control socket will not be created!",
             sockpath)
         return False
     try:
         sock = create_unix_domain_socket(sockpath, None, 0o600)
         sock.listen(5)
     except:
         log.warn("failed to setup control socket %s",
                  sockpath,
                  exc_info=True)
         return False
     self.control_socket = sock
     self.control_socket_path = sockpath
     log.info(
         "proxy instance now also available using unix domain socket: %s",
         self.control_socket_path)
     return True