Bugs item #1307798, was opened at 2005-09-29 12:05 Message generated for change (Comment added) made by jacek_poplawski 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: Jacek Poplawski (jacek_poplawski) Date: 2005-10-03 09:01 Message: Logged In: YES user_id=264913 Only version of Python from Cygwin which doesn't lock: Python 2.4 (#1, Dec 4 2004, 20:10:33) [GCC 3.3.3 (cygwin special)] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> Example of version which locks (compiled by hand): 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 Or Python 2.4.1 from current Cygwin. Official versions of Python for Windows also don't lock, because they use different way to implement subprocess.Popen, but I can't use such Python - it lacks some features of Cygwin. PS. I don't know how to report version of Cygwin, it was installed just by running setup.exe and downloading packages. ---------------------------------------------------------------------- Comment By: Neal Norwitz (nnorwitz) Date: 2005-10-02 22: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 10: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-30 07: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 21: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 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com