Reap child processes
Previously child processes were not reaped, leaving zombies behind. Now each child process's `.wait()` method is called before proceeding. Closes #151.
This commit is contained in:
parent
d8edaeb6ac
commit
47bb435176
2 changed files with 13 additions and 6 deletions
|
@ -79,6 +79,7 @@ def merge(merged_path):
|
|||
s = time.time()
|
||||
compiler = subprocess.Popen(command, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
|
||||
out = compiler.stdout.read().decode("utf8")
|
||||
compiler.wait()
|
||||
logging.debug("Running: %s (Done in %.2fs)" % (command, time.time() - s))
|
||||
if out and out.startswith("("):
|
||||
parts.append(out)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue