STINNER Victor added the comment:

> 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()
---

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21772>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to