We are leaking forked processes on macOS because the cleanup function
was checking the existence of /proc/pid which does not exist on macOS.
I've changed the code to be platform agnostic.
del self.subprocesses[:]
# Ensure any forked processes are cleaned up
for pid in self.forkedProcessPids:
- if os.path.exists("/proc/" + str(pid)):
+ try:
os.kill(pid, signal.SIGTERM)
+ except OSError:
+ pass
def spawnSubprocess(self, executable, args=[], install_remote=True):
""" Creates a subprocess.Popen object with the specified executable and arguments,