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 vstinner
Recipients amaury.forgeotdarc, christian.heimes, vstinner
Date 2013-06-21.12:27:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1371817647.05.0.713157058648.issue18276@psf.upfronthosting.co.za>
In-reply-to
Content
> OK, let's do that on Windows first :-)

For the PEP 433, I did something like that in os.get_cloexec() and os.set_cloexec():

http://hg.python.org/features/pep-433/file/f32c2b09f332/Modules/posixmodule.c#l10198

On Windows, I added two code paths: one for HANDLE (to support sockets), one for file descriptors (classic files). It means that you need a C function supports HANDLE as input type, rather than int (file descriptor).

Can't we raise a nice error message when we get a socket, whereas the function does not support HANDLE? What is the current message on Windows when passing sock.fileno() to a function expecting a file descriptor? Would it be worse if Python implictly call .fileno() on a socket?
History
Date User Action Args
2013-06-21 12:27:27vstinnersetrecipients: + vstinner, amaury.forgeotdarc, christian.heimes
2013-06-21 12:27:27vstinnersetmessageid: <1371817647.05.0.713157058648.issue18276@psf.upfronthosting.co.za>
2013-06-21 12:27:27vstinnerlinkissue18276 messages
2013-06-21 12:27:26vstinnercreate