This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

python errors with popen/threads/select


We are encountering errors in our python code when invoking system
commands using popen2.Popen3() in a separate thread. This code works
fine on linux [and many other OSes ] - but not on cygwin/python/WinXP.

I'm attaching a minimal example code that demonstrates this problem.
This test code runs the command '/bin/true' in 2 modes. [multiple
times in a loop]

- run the command in a separate thread [using popen]
- run the command directly [using popen]

The thread version fails numerous times [with wait() on pipe returning
error codes] - whereas the one run directly does not.

Hoping the bug can be identified.

thanks,
Satish

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

$ /usr/bin/cygcheck.exe -c cygwin python
Cygwin Package Information
Package              Version        Status
cygwin               1.5.24-2       OK
python               2.5-1          OK

$ python th-bug.py 
pipe.wait() returns error code: 1280
pipe.wait() returns error code: 1280
pipe.wait() returns error code: 1280
pipe.wait() returns error code: 1280
pipe.wait() returns error code: 1280
pipe.wait() returns error code: 1280
pipe.wait() returns error code: 1280
pipe.wait() returns error code: 1280
pipe.wait() returns error code: 1280
pipe.wait() returns error code: 1280
thread+pipe overhead 2.47299981117
pipe overhead 2.26300001144

Attachment: th-bug.py
Description: Text document

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]