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:
Klaus Alexander Seistrup 2015-09-06 17:41:12 +02:00
parent d8edaeb6ac
commit 47bb435176
2 changed files with 13 additions and 6 deletions

View file

@ -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)