Closing the stdout file descriptor when finished (#3864)

This commit is contained in:
Eshed Magali 2026-03-11 18:50:58 +02:00 committed by GitHub
parent 1dc4aa9882
commit ba94c58230
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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