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 eryksun
Recipients eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2016-09-15.03:26:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473909981.28.0.381163712265.issue28163@psf.upfronthosting.co.za>
In-reply-to
Content
WindowsConsoleIO fileno() gets a file descriptor on demand by calling _open_osfhandle. As a low I/O function this expects _open flags, but currently the code is passing 'rb' (int 0x7262) and 'wb' (int 0x7762). It should use _O_RDONLY | _O_BINARY and _O_WRONLY | _O_BINARY. 

Actually, _open_osfhandle isn't actually opening the file, so it only cares about a few flags. Specifically, in lowio\osfinfo.cpp I see that it looks for _O_APPEND, _O_TEXT, and _O_NOINHERIT. So in this case passing 0 for the flags would also be ok.
History
Date User Action Args
2016-09-15 03:26:21eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower
2016-09-15 03:26:21eryksunsetmessageid: <1473909981.28.0.381163712265.issue28163@psf.upfronthosting.co.za>
2016-09-15 03:26:21eryksunlinkissue28163 messages
2016-09-15 03:26:20eryksuncreate