[issue9611] FileIO not 64-bit safe under Windows

Antoine Pitrou report at bugs.python.org
Sun Aug 15 20:20:40 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

The write() man page says:

       The number of bytes written may be less than count if, for example, there is  insufficient  space  on
       the underlying physical medium, or the RLIMIT_FSIZE resource limit is encountered (see setrlimit(2)),
       or the call was interrupted by a signal handler after having written less  than  count  bytes.   (See
       also pipe(7).)

So, we could return the number of bytes successfully written, and let the next call fail.

Another possibility is to only write 2GB-1 and let the caller retry.
Most people use buffered I/O, and the buffered layer automatically retries.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9611>
_______________________________________


More information about the Python-bugs-list mailing list