This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zmedico
Recipients zmedico
Date 2009-02-27.08:03:31
SpamBayes Score 1.1270277e-08
Marked as misclassified No
Message-id <1235721814.23.0.522352333065.issue5380@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-02-27 08:03:34zmedicosetrecipients: + zmedico
2009-02-27 08:03:34zmedicosetmessageid: <1235721814.23.0.522352333065.issue5380@psf.upfronthosting.co.za>
2009-02-27 08:03:32zmedicolinkissue5380 messages
2009-02-27 08:03:32zmedicocreate