[ python-Bugs-1307798 ] subprocess.Popen locks on Cygwin

SourceForge.net noreply at sourceforge.net
Sun Oct 2 22:22:47 CEST 2005


Bugs item #1307798, was opened at 2005-09-29 03:05
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1307798&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Threads
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Jacek Poplawski (jacek_poplawski)
Assigned to: Jason Tishler (jlt63)
Summary: subprocess.Popen locks on Cygwin

Initial Comment:
I have problem running application with
subprocess.Popen, it happens only on Python from Cygwin
or compiled on Cygwin. It works correctly on Linux,
QNX, and Python from Windows installer, it also works
on one version of Python 2.4.0 from Cygwin.

When I run application with shell=True - everything is
OK, but when I run it without it - Popen locks on data
= os.read(errpipe_read, 1048576). 

Using options stdin, stdout, stderr doesn't help.

I can't reproduce it with any simple application,
application I am running is written in C++, multithreaded. 

$ python
Python 2.4.2 (#1, Sep 29 2005, 10:56:12)
[GCC 3.4.4 (cygming special) (gdc 0.12, using dmd
0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for
more information.
>>> import subprocess
>>> subprocess.Popen("./application.exe")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.4/subprocess.py", line
542, in __init__
    errread, errwrite)
  File "/usr/local/lib/python2.4/subprocess.py", line
970, in _execute_child
    data = os.read(errpipe_read, 1048576) # Exceptions
limited to 1 MB
KeyboardInterrupt
>>> subprocess.Popen("./application.exe",shell=True)
<subprocess.Popen object at 0x4dd0ec>


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-02 13:22

Message:
Logged In: YES 
user_id=33168

Jacek, are all the failures on cygwin?  Can you report the
version of cygwin on the failing boxes as well as the
version of cygwin on the box that passed the test?

----------------------------------------------------------------------

Comment By: Jacek Poplawski (jacek_poplawski)
Date: 2005-09-30 01:07

Message:
Logged In: YES 
user_id=264913

Yes, I can run test_subprocess.py and all 38 tests are OK
(in 15 seconds).
Just like I wrote I can't reproduce that with any simple
command, so maybe problem is that subprocess.Popen locks
_if_ application does something specific - but what?

PS. But I can reproduce that on few different computers with
different Python installations so it is not just
installation problem.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2005-09-29 22:33

Message:
Logged In: YES 
user_id=33168

Jason, any comments?  Is this cygwin specific or a general
subprocess issue?

----------------------------------------------------------------------

Comment By: Peter Åstrand (astrand)
Date: 2005-09-29 12:32

Message:
Logged In: YES 
user_id=344921

Does the testsuite test_subprocess.py work correctly on this
platform?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1307798&group_id=5470


More information about the Python-bugs-list mailing list