Hirokazu Yamamoto <ocean-c...@m2.ccsnet.ne.jp> added the comment:

I think this is not array modules' bug. Attached test program outputs
different results on trunk/py3k.

debian:~/python-dev/trunk# ./python /mnt/windows/simple_test.py
os.pipe: success
pty.openpty: success

debian:~/python-dev/py3k# ./python /mnt/windows/simpled_test.py
b'os.pipe: success'
Traceback (most recent call last):
  File "/mnt/windows/simpled_test.py", line 17, in <module>
    gotdata = master_file.read(len(data) + 1)
  File "/root/python-dev/py3k/Lib/io.py", line 918, in read
    return self._read_unlocked(n)
  File "/root/python-dev/py3k/Lib/io.py", line 952, in _read_unlocked
    chunk = self.raw.read(wanted)
IOError: [Errno 5] Input/output error

And if you use io.open instead of os.fdopen, you can see same error
happens on trunk. So I think this is io module's bug. (py3k is using io
module deeply)

----------
nosy: +ocean-city
title: array.fromfile() on master pty raises IOError when slave pty device is 
closed -> pty.read raises IOError when slave pty device is closed
Added file: http://bugs.python.org/file13202/simple_test.py

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

Reply via email to