[issue17976] file.write doesn't raise IOError when it should

Jaakko Moisio report at bugs.python.org
Tue Dec 17 15:49:46 CET 2013


Jaakko Moisio added the comment:

The new patch is fine as it is, but my logic behind using err_flag was the following: err_flag was set solely based on the inspection of return value of fwrite and ferror, without referencing to errno. It is of course true that at the same time errno is set to non-zero in any correct C standard library implementation (err_flag != 0 iff err != 0), but as the patch was originally for circumventing a bug in glibc, I decided to be use that extra flag for the purpose.

> But I'm still unable to reproduce the glibc bug mentioned by Charles-François :

Yes. It seems that the bug in glibc has been fixed. But at least Python 2.7 is now a little bit better guarded against exotic file IO bugs that might emerge in C standard libraries :)

----------

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


More information about the Python-bugs-list mailing list