[issue14310] Socket duplication for windows

sbt report at bugs.python.org
Mon Mar 19 22:42:08 CET 2012


sbt <shibturn at gmail.com> added the comment:

> If duplication happened early, then there would have to be a way to 
> "unduplicate" it in the source process if, say, IPC somehow failed.  
> There is currently no api to undo the effects of WSADuplicateSocket().

If this were a normal handle then you could use the DUPLICATE_CLOSE_SOURCE flag with DuplicateHandle() to close it.  But using DuplicateHandle() with socket handles is discouraged.

I find the ability to duplicate and close handles in unrelated processes of the same user rather surprising.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14310>
_______________________________________


More information about the Python-bugs-list mailing list