Message191574
> 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? |
|
Date |
User |
Action |
Args |
2013-06-21 12:27:27 | vstinner | set | recipients:
+ vstinner, amaury.forgeotdarc, christian.heimes |
2013-06-21 12:27:27 | vstinner | set | messageid: <1371817647.05.0.713157058648.issue18276@psf.upfronthosting.co.za> |
2013-06-21 12:27:27 | vstinner | link | issue18276 messages |
2013-06-21 12:27:26 | vstinner | create | |
|