Ejemplo n.º 1
0
 def __del__(self):
     # Don't delete the file: we might have forked.
     if self.socket is not None:
         self.socket.close()
     if self.pipe is not None:
         # Check if there are any remaining valid handles and close them
         if self.pipe:
             winutils.close_handle(self.pipe)
         if self._connect.hEvent:
             winutils.close_handle(self._read.hEvent)
Ejemplo n.º 2
0
 def close(self):
     """Closes this PassiveStream."""
     if self.socket is not None:
         self.socket.close()
     if self.pipe is not None:
         winutils.close_handle(self.pipe, vlog.warn)
         winutils.close_handle(self.connect.hEvent, vlog.warn)
     if self.bind_path is not None:
         ovs.fatal_signal.unlink_file_now(self.bind_path)
         self.bind_path = None
Ejemplo n.º 3
0
 def close(self):
     """Closes this PassiveStream."""
     if self.socket is not None:
         self.socket.close()
     if self.pipe is not None:
         winutils.close_handle(self.pipe, vlog.warn)
         winutils.close_handle(self.connect.hEvent, vlog.warn)
     if self.bind_path is not None:
         ovs.fatal_signal.unlink_file_now(self.bind_path)
         self.bind_path = None
Ejemplo n.º 4
0
 def __del__(self):
     # Don't delete the file: we might have forked.
     if self.socket is not None:
         self.socket.close()
     if self.pipe is not None:
         # Check if there are any remaining valid handles and close them
         if self.pipe:
             winutils.close_handle(self.pipe)
         if self._connect.hEvent:
             winutils.close_handle(self._read.hEvent)
Ejemplo n.º 5
0
 def close_all_handles(self):
     """Close all the handles used by this class."""
     if hasattr(self, "namedpipe") and self.namedpipe:
         ovs_winutils.close_handle(self.namedpipe)
     if hasattr(self, "_read") and self._read.hEvent:
         ovs_winutils.close_handle(self._read.hEvent)
     if hasattr(self, "_npipe_file") and self._npipe_file:
         ovs_winutils.close_handle(self._npipe_file)
Ejemplo n.º 6
0
 def close(self):
     if self.socket is not None:
         self.socket.close()
     if self.pipe is not None:
         if self._server:
             win32pipe.DisconnectNamedPipe(self.pipe)
         winutils.close_handle(self.pipe, vlog.warn)
         winutils.close_handle(self._read.hEvent, vlog.warn)
         winutils.close_handle(self._write.hEvent, vlog.warn)
Ejemplo n.º 7
0
 def close(self):
     if self.socket is not None:
         self.socket.close()
     if self.pipe is not None:
         if self._server:
             win32pipe.DisconnectNamedPipe(self.pipe)
         winutils.close_handle(self.pipe, vlog.warn)
         winutils.close_handle(self._read.hEvent, vlog.warn)
         winutils.close_handle(self._write.hEvent, vlog.warn)
Ejemplo n.º 8
0
 def close(self):
     if self.socket is not None:
         self.socket.close()
     if self.pipe is not None:
         if self._server:
             # Flush the pipe to allow the client to read the pipe
             # before disconnecting.
             win32pipe.FlushFileBuffers(self.pipe)
             win32pipe.DisconnectNamedPipe(self.pipe)
         winutils.close_handle(self.pipe, vlog.warn)
         winutils.close_handle(self._read.hEvent, vlog.warn)
         winutils.close_handle(self._write.hEvent, vlog.warn)
Ejemplo n.º 9
0
 def close(self):
     if self.socket is not None:
         self.socket.close()
     if self.pipe is not None:
         if self._server:
             # Flush the pipe to allow the client to read the pipe
             # before disconnecting.
             win32pipe.FlushFileBuffers(self.pipe)
             win32pipe.DisconnectNamedPipe(self.pipe)
         winutils.close_handle(self.pipe, vlog.warn)
         winutils.close_handle(self._read.hEvent, vlog.warn)
         winutils.close_handle(self._write.hEvent, vlog.warn)
Ejemplo n.º 10
0
 def close_filehandle(self):
     """Close the file handle."""
     ovs_winutils.close_handle(self._npipe_file)