Lorenzo Stoakes added the comment:

Surely it's not a good idea to attempt to generate an exception within
an exception handler, couldn't this lead to an infinite loop scenario?

The checks prior to fputs() handle any errors by calling err_closed()
and returning -1. I suggest we do the same for the fputs() statement.
According to the documentation for fputs(), any errors result in a
return value of EOF, therefore an if(fputs(...) == EOF) { ... } check
seems appropriate.

I enclose a patch to this end, please let me know whether I'm way off
the mark here :-)

----------
nosy: +codegrunt
Added file: http://bugs.python.org/file9215/fputsfix

_____________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1598083>
_____________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to