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 larry
Recipients amaury.forgeotdarc, larry, sbt
Date 2012-07-06.14:16:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1341584196.67.0.703107638593.issue15263@psf.upfronthosting.co.za>
In-reply-to
Content
#15261 shows us that Windows can crash if you pass in an invalid file handle to Windows POSIX-y functions.  We should ensure that functions which accept path-as-an-int-fd guard against this where necessary.

I propose a macro, something like

#ifdef MS_WINDOWS
#define FD_GUARD(fd) (_PyVerify_fd(fd) ? (fd) : INVALID_HANDLE_VALUE)
#else
#define FD_GUARD(fd) (fd)
#endif
History
Date User Action Args
2012-07-06 14:16:36larrysetrecipients: + larry, amaury.forgeotdarc, sbt
2012-07-06 14:16:36larrysetmessageid: <1341584196.67.0.703107638593.issue15263@psf.upfronthosting.co.za>
2012-07-06 14:16:36larrylinkissue15263 messages
2012-07-06 14:16:35larrycreate