This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients Jeong-Min.Lee, gregory.p.smith, janwijbrand, neologix, pitrou
Date 2013-08-28.17:50:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377712216.33.0.344375875746.issue18851@psf.upfronthosting.co.za>
In-reply-to
Content
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))
History
Date User Action Args
2013-08-28 17:50:16neologixsetrecipients: + neologix, gregory.p.smith, pitrou, janwijbrand, Jeong-Min.Lee
2013-08-28 17:50:16neologixsetmessageid: <1377712216.33.0.344375875746.issue18851@psf.upfronthosting.co.za>
2013-08-28 17:50:16neologixlinkissue18851 messages
2013-08-28 17:50:16neologixcreate