Author vstinner
Recipients Tor.Colvin, lemburg, vstinner
Date 2014-06-16.21:30:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402954205.17.0.354205750593.issue21772@psf.upfronthosting.co.za>
In-reply-to
Content
> Calling f.read() on naked os.open() output can produce "IOError: [Errno 4] Interrupted system call". Attached is a suggested fix.

I cannot reproduce your issue. What is your exact Python version and OS?

I tried to run 100 threads calling 100 times platform._syscmd_uname('-p'). I didn't reproduce the issue on Python 2.7 or 3.5.

---
import platform
import threading

def test():
    for x in range(100):
        p = platform._syscmd_uname('-p')

threads = [threading.Thread(target=test) for n in range(100)]
for thread in threads:
    thread.start()
for thread in threads:
    thread.join()
---
History
Date User Action Args
2014-06-16 21:30:05vstinnersetrecipients: + vstinner, lemburg, Tor.Colvin
2014-06-16 21:30:05vstinnersetmessageid: <1402954205.17.0.354205750593.issue21772@psf.upfronthosting.co.za>
2014-06-16 21:30:05vstinnerlinkissue21772 messages
2014-06-16 21:30:05vstinnercreate