Charles-François Natali added the comment: Yes, the problem is that the pipes FDs are closed twice if fork() succeeds, but exec() fails.
They're closed in _execute_child(): 1286 if p2cread is not None and p2cwrite is not None: 1287 os.close(p2cread) 1288 if c2pwrite is not None and c2pread is not None: 1289 os.close(c2pwrite) 1290 if errwrite is not None and errread is not None: 1291 os.close(errwrite) And then again in Popen.__init__: 716 if stdin == PIPE: 717 to_close.extend((p2cread, p2cwrite)) 718 if stdout == PIPE: 719 to_close.extend((c2pread, c2pwrite)) 720 if stderr == PIPE: 721 to_close.extend((errread, errwrite)) ---------- nosy: +neologix _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18851> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com