Skip to content

Commit 2e4821b

Browse files
committed
NOT NECESSARY mitogen/parent: Ignore if STDERR is not available
If STDERR is not available, ignore the OSError since it's a non-critical error. Note: This change is not necessary as the exception message would be print on stderr and stderr is already closed and the exit status of the forked child process is not checked yet. Signed-off-by: Marc Hartmayer <[email protected]>
1 parent 343f2c9 commit 2e4821b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mitogen/parent.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,10 @@ def _first_stage():
14651465
f.write(C)
14661466
f.close()
14671467
os.write(1,'MITO001\n'.encode())
1468-
os.close(2)
1468+
try:
1469+
os.close(2)
1470+
except OSError:
1471+
pass
14691472

14701473
def get_python_argv(self):
14711474
"""

0 commit comments

Comments
 (0)