Message82824
With python-3.0, array.fromfile() raises an IOError when reading from a
master pty device after the slave device has been closed. This causes
remaining data that had been written to the slave device to be lost. I
have observed this problem with python-3.0.1 on linux (I get the same
result with or without the patch from issue 5334). The traceback
produced by the attached test case looks like this:
Traceback (most recent call last):
File "./fromfile_pty_ioerror.py", line 26, in <module>
buf.fromfile(master_file, bufsize)
File "/usr/lib/python3.0/io.py", line 918, in read
return self._read_unlocked(n)
File "/usr/lib/python3.0/io.py", line 952, in _read_unlocked
chunk = self.raw.read(wanted)
IOError: [Errno 5] Input/output error
With python-2.x, the remaining data is appended to the array and an
EOFError is raised like one would expect. |
|
Date |
User |
Action |
Args |
2009-02-27 08:03:34 | zmedico | set | recipients:
+ zmedico |
2009-02-27 08:03:34 | zmedico | set | messageid: <1235721814.23.0.522352333065.issue5380@psf.upfronthosting.co.za> |
2009-02-27 08:03:32 | zmedico | link | issue5380 messages |
2009-02-27 08:03:32 | zmedico | create | |
|