diff --git a/openmc/executor.py b/openmc/executor.py index 9cd299345..75094e738 100644 --- a/openmc/executor.py +++ b/openmc/executor.py @@ -103,6 +103,7 @@ def _run(args, output, cwd): # If OpenMC is finished, break loop line = p.stdout.readline() if not line and p.poll() is not None: + p.stdout.close() break lines.append(line)