issue #406: more leaked FDs when create_child() fails.

issue260
David Wilson 6 years ago
parent 003526ef7b
commit dc3db49c5a

@ -285,6 +285,9 @@ def create_child(args, merge_stdio=False, stderr_pipe=False, preexec_fn=None):
except Exception: except Exception:
childfp.close() childfp.close()
parentfp.close() parentfp.close()
if stderr_pipe:
os.close(stderr_r)
os.close(stderr_w)
raise raise
if stderr_pipe: if stderr_pipe:

Loading…
Cancel
Save