[issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE

Karthk Rajagopalan report at bugs.python.org
Tue Nov 13 21:57:50 CET 2012


Karthk Rajagopalan added the comment:

Hi Tim,

Thanks for your reply.

I added test case using perl and python since it was easy to reproduce using perl socket module and show the issue happening with python's subprocess.py. There is definitely an action required in subprocess.py to catch 'invalid handle error' and my attached patch handle this situation.

I can come up with a test case like perl does to create a listening socket and map the socket handle to a file descriptor. You will see this issue *only* when the open_osfhandle(..) is used to map the handle to a file descriptor.

-Karthik

----------

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


More information about the Python-bugs-list mailing list