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 George Prekas
Recipients George Prekas
Date 2015-10-27.15:33:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Under Windows, if I do FreeConsole and then with redirected stdin or stdout or stderr, then fails. The only solution is either DO NOT redirect any handle OR to redirect ALL of them. The problem lies in function _get_handles at (Python 2.7.10), which does:
* GetStdHandle
* DuplicateHandle via _make_inheritable.

DuplicateHandle fails if called on stdin, stdout or stderr after FreeConsole.

$ cygstart /mnt/c/utils/Python35/python.exe fails
$ cygstart /mnt/c/utils/Python35/python.exe works1
$ cygstart /mnt/c/utils/Python35/python.exe works2
$ cygstart /mnt/c/utils/Python35/python.exe works3
Date User Action Args
2015-10-27 15:33:15George Prekassetrecipients: + George Prekas
2015-10-27 15:33:14George Prekassetmessageid: <>
2015-10-27 15:33:14George Prekaslinkissue25492 messages
2015-10-27 15:33:14George Prekascreate