diff Doc/lib/libstdtypes.tex @ 26672:8dd25a6f5913 legacy-trunk

Fixed bug [#521782] unreliable file.read() error handling * Objects/fileobject.c (file_read): Clear errors before leaving the loop in all situations, and also check if some data was read before exiting the loop with an EWOULDBLOCK exception. * Doc/lib/libstdtypes.tex * Objects/fileobject.c Document that sometimes a read() operation can return less data than what the user asked, if running in non-blocking mode. * Misc/NEWS Document the fix.
author Gustavo Niemeyer <gustavo@niemeyer.net>
date Mon, 16 Dec 2002 18:12:53 +0000
parents 0c646baeec58
children 6932794817c2
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex	Mon Dec 16 14:09:22 2002 +0000
+++ b/Doc/lib/libstdtypes.tex	Mon Dec 16 18:12:53 2002 +0000
@@ -1205,7 +1205,9 @@
   certain files, like ttys, it makes sense to continue reading after
   an \EOF{} is hit.)  Note that this method may call the underlying
   C function \cfunction{fread()} more than once in an effort to
-  acquire as close to \var{size} bytes as possible.
+  acquire as close to \var{size} bytes as possible. Also note that
+  when in non-blocking mode, less data than what was requested may
+  be returned, even if no \var{size} parameter was given.
 \end{methoddesc}
 
 \begin{methoddesc}[file]{readline}{\optional{size}}