summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-12 20:01:53 (GMT)
committerGuido van Rossum <guido@python.org>2001-10-12 20:01:53 (GMT)
commit79fd0fcae4ecddca7ae441a4ffec4fe54ef760bc (patch)
treed9e366ba08cd41d696cf2c171f0ac2ae7738e2b5 /Modules
parentc65b3d95b6ef2194e4e92c93e276a07aed0e2464 (diff)
downloadcpython-79fd0fcae4ecddca7ae441a4ffec4fe54ef760bc.zip
cpython-79fd0fcae4ecddca7ae441a4ffec4fe54ef760bc.tar.gz
cpython-79fd0fcae4ecddca7ae441a4ffec4fe54ef760bc.tar.bz2
Band-aid solution to SF bug #470634: readlines() on linux requires 2 ^D's.
The problem is that if fread() returns a short count, we attempt another fread() the next time through the loop, and apparently glibc clears or ignores the eof condition so the second fread() requires another ^D to make it see the eof condition. According to the man page (and the C std, I hope) fread() can only return a short count on error or eof. I'm using that in the band-aid solution to avoid calling fread() a second time after a short read. Note that xreadlines() still has this problem: it calls readlines(sizehint) until it gets a zero-length return. Since xreadlines() is mostly used for reading real files, I won't worry about this until we get a bug report.
Diffstat (limited to 'Modules')
0 files changed, 0 insertions, 0 deletions