Beispiel #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)
 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
Beispiel #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
 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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
 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)
Beispiel #10
0
 def close_filehandle(self):
     """Close the file handle."""
     ovs_winutils.close_handle(self._npipe_file)