Skip to content

Commit a3ff3d4

Browse files
authored
Merge pull request #1290 from JDevlieghere/stop-leaking-forked-procs
[lldb/Test] Don't leak forked processes on Darwin
2 parents f46625d + 42d80f0 commit a3ff3d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lldb/packages/Python/lldbsuite/test/lldbtest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,8 +857,10 @@ def cleanupSubprocesses(self):
857857
del self.subprocesses[:]
858858
# Ensure any forked processes are cleaned up
859859
for pid in self.forkedProcessPids:
860-
if os.path.exists("/proc/" + str(pid)):
860+
try:
861861
os.kill(pid, signal.SIGTERM)
862+
except OSError:
863+
pass
862864

863865
def spawnSubprocess(self, executable, args=[], install_remote=True):
864866
""" Creates a subprocess.Popen object with the specified executable and arguments,

0 commit comments

Comments
 (0)