We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5210198 commit c69cea3Copy full SHA for c69cea3
osquery/management.py
@@ -98,6 +98,14 @@ def __del__(self):
98
# On macOS and Linux mkstemp opens a descriptor.
99
if self._socket is not None and self._socket[0] is not None:
100
os.close(self._socket[0])
101
+
102
+ # Remove the dangling temporary file from mkstemp if it still exists
103
+ if os.path.exists(self._socket[1]):
104
+ try:
105
+ os.unlink(self._socket[1])
106
+ except OSError:
107
+ logging.warning("Failed to remove socket descriptor: %s", self._socket[1])
108
109
self._socket = None
110
111
def open(self, timeout=2, interval=0.01):
0 commit comments