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.

classification
Title: cygwin: popen3 lock up
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, jpham, jpsc986_hj, neologix, nnorwitz
Priority: normal Keywords:

Created on 2006-05-26 23:30 by jpsc986_hj, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
unnamed jpham, 2010-08-23 00:16
Messages (6)
msg28660 - (view) Author: jpsc986_hj (jpsc986_hj) Date: 2006-05-26 23:30
Look like I have similar problem with cygwin


I do the followings

   si,so,se = os.popen3('make all')
   dresult = so.readlines()
   eresult = so.readlines()

where make all does a build - and with tons of error 
on stderror.  After x minutes, I can see the program 
to lock up.  


msg28661 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-05-27 03:51
Logged In: YES 
user_id=33168

A similar problem to what?

Can you provide any more info or help debug this problem?  I
don't have a windows box, so I can't begin to help with this.
msg28662 - (view) Author: jpsc986_hj (jpsc986_hj) Date: 2006-05-27 05:47
Logged In: YES 
user_id=1356401

Ooops - I make a typo

it should be 

   eresult = se.readlines()
not 
    ersult = so.readlines()

msg114666 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-08-22 10:31
Any Cygwin/Windows people interested in this, or can it be closed?
msg114718 - (view) Author: John Pham (jpham) Date: 2010-08-23 00:16
last time I use - it is still a problem
msg137470 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-06-02 10:03
It's not a bug.
so.readlines reads the subprocess' stdout until EOF is encountered, but in the meantime, if it writes a lot to stderr, the corresponding pipe fills up, and the subprocess blocks on the write.
You should use Popen's communicate method.

Closing as invalid.
History
Date User Action Args
2022-04-11 14:56:17adminsetgithub: 43419
2011-06-02 10:03:11neologixsetstatus: open -> closed

nosy: + neologix
messages: + msg137470

resolution: not a bug
stage: test needed -> resolved
2010-08-23 00:16:34jphamsetfiles: + unnamed

messages: + msg114718
nosy: + jpham
2010-08-22 10:31:32BreamoreBoysetnosy: + BreamoreBoy

messages: + msg114666
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
2009-03-21 03:38:43ajaksu2setstage: test needed
type: behavior
versions: + Python 2.6
2006-05-26 23:30:15jpsc986_hjcreate