cygwin python: subprocess.Popen().stdout + threads == hang

Charles Wilson cygwin@cwilson.fastmail.fm
Mon Jul 28 04:32:00 GMT 2008


Jason Tishler wrote:

> As my README indicates, Cygwin Python has some pthreads-related issues.
> Given that you don't observe this behavior on other platforms, it seems
> like this is a Cygwin specific problem.  So, I don't think raising an
> upstream bug report will help.
> 
> I would like to help with this problem, but my expectation is it will
> take many hours or days to debug.  I've been in the Cygwin and Python
> pthreads-related code before and it is not a fun place to be. :,)
> Sorry, but the reality is I don't have the time to help with a problem
> of this difficulty.

Understandable. I wish it were otherwise, but no worries. I actually 
worked around the problem in my real app by avoiding threads entirely -- 
at least in this context -- on unix (incl. cygwin), since 
select.select() can be used with regular file descriptors on those 
platforms. I only really needed threads+subprocess.Popen.stdout in this 
context on win32, because win32 select.select() works only with sockets.

It's funny. I dimly recall running into something almost the same -- 
maybe exactly the same -- about two years ago. At that time I just 
completely punted and dropped cygwin from the list of supported 
platforms...I like my current workaround better that /that/. <g>

FWIW, I did try a few recent thread-related patches from python SVN -- 
some from the release25-maint branch and some I backported from trunk 
(like this: http://bugs.python.org/issue874900). No joy there, 
unfortunately.

--
Chuck



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list