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 Segev Finer
Recipients Segev Finer, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-04-20.22:43:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za>
In-reply-to
Content
subprocess triggers a debug assertion in the CRT on failure to execute the process due to closing the pipe *handles* in the except clause using os.close rather than .Close() (os.close closes CRT file descriptors and not handles).

In addition to that once this is fixed there is also a double free/close since we need to set `self._closed_child_pipe_fds = True` once we closed the handles in _execute_child so they won't also be closed in __init__.

To reproduce, do this in a debug build of Python:

    import subprocess
    subprocess.Popen('exe_that_doesnt_exist.exe', stdout=subprocess.PIPE)

See: https://github.com/python/cpython/pull/1218#discussion_r112550959
History
Date User Action Args
2017-04-20 22:43:55Segev Finersetrecipients: + Segev Finer, paul.moore, tim.golden, zach.ware, eryksun, steve.dower
2017-04-20 22:43:55Segev Finersetmessageid: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za>
2017-04-20 22:43:55Segev Finerlinkissue30121 messages
2017-04-20 22:43:55Segev Finercreate