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 tim.golden
Recipients hercs, kartlee05, tim.golden
Date 2012-11-14.15:20:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <50A3B69E.2040407@timgolden.me.uk>
In-reply-to <1352840270.41.0.84863390681.issue16458@psf.upfronthosting.co.za>
Content
On 13/11/2012 20:57, Karthk Rajagopalan wrote:
> 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.

So, because subprocess.call includes a call to DuplicateHandle(stdin),
that call will fail if stdin is currently a handle to a socket.
Is that right?

Your patch fails to apply cleanly to the hg tip, because Gregory P.
Smith has been making changes in this very piece of code over the last
few days. I'll add him as interested to the call as someone who can make
a call as to the suitability of your patch.

> 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.

If this is to go ahead, we will need a test case which can run as part
of the Python stdlib tests, and perl is not part of that stdlib!
History
Date User Action Args
2012-11-14 15:20:01tim.goldensetrecipients: + tim.golden, kartlee05, hercs
2012-11-14 15:20:01tim.goldenlinkissue16458 messages
2012-11-14 15:20:00tim.goldencreate