diff --git a/mitogen/parent.py b/mitogen/parent.py index f2dacb09..556f38c6 100644 --- a/mitogen/parent.py +++ b/mitogen/parent.py @@ -285,6 +285,9 @@ def create_child(args, merge_stdio=False, stderr_pipe=False, preexec_fn=None): except Exception: childfp.close() parentfp.close() + if stderr_pipe: + os.close(stderr_r) + os.close(stderr_w) raise if stderr_pipe: