def op_sslreceive(self, name, _):
     if self.transport:
         self.send_reply(["ready", name])
         p2cread, p2cwrite = os.pipe()
         from xen.util import oshelp
         oshelp.fcntl_setfd_cloexec(p2cwrite, True)
         threading.Thread(target=connection.SSLSocketServerConnection.recv2fd,
                          args=(self.transport.sock, p2cwrite)).start()
         try:
             XendDomain.instance().domain_restore_fd(p2cread,
                                                     relocating=True)
         except:
             os.close(p2cread)
             os.close(p2cwrite)
             self.send_error()
             self.close()
     else:
         log.error(name + ": no transport")
         raise XendError(name + ": no transport")
Example #2
0
 def _openSentinel(self, sentinel_path_fifo):
     self.sentinel_fifo = file(sentinel_path_fifo, 'r')
     self.sentinel_lock = thread.allocate_lock()
     oshelp.fcntl_setfd_cloexec(self.sentinel_fifo, True)
     sentinel_fifos_inuse[sentinel_path_fifo] = 1
     self.sentinel_path_fifo = sentinel_path_fifo
 def setCloseOnExec(self):
     oshelp.fcntl_setfd_cloexec(self.stream, True)
Example #4
0
 def _openSentinel(self, sentinel_path_fifo):
     self.sentinel_fifo = file(sentinel_path_fifo, 'r')
     self.sentinel_lock = thread.allocate_lock()
     oshelp.fcntl_setfd_cloexec(self.sentinel_fifo, True)
     sentinel_fifos_inuse[sentinel_path_fifo] = 1
     self.sentinel_path_fifo = sentinel_path_fifo
Example #5
0
 def setCloseOnExec(self):
     oshelp.fcntl_setfd_cloexec(self.stream, True)