2013/8/21 Guido van Rossum <gu...@python.org>:
> Also, are you sure the things returned by socket.fleno() are really Windows
> handles? I thought they were some other artificial namespace used just by
> sockets.

(You know what? I know understand and love the UNIX concept
"everything is file"!)

I don't know if a socket handle is similar to file handles or if they
are specials. At least, GetHandleInformation() and
SetHandleInformation() functions, used by
os.get/set_handle_inheritable(), accept socket handles.

Outside the socket module, the subprocess and multiprocessing modules
use also Windows handles. The subprocess has for example a private
_make_inheritable() method which could be replaced with
os.set_handle_inheritable(). I'm not sure because _make_inheritable()
duplicates the input handle, whereas os.set_handle_inheritable()
modify directly the handle. I don't know why the handle needs to be
duplicated.

Victor
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to