Benjamin Peterson added the comment:

This code is pretty broken. I don't think ttys are ever seekable, so the 
os.fdopen has probably been always failing since 3.0. It thus always leaks an 
fd to '/dev/tty' if the first os.open succeeds. The whole function should 
probably be rewriten to work with byte streams encoding the prompt with 
os.device_encoding(tty_fd) falling back on locale.getpreferredencoding().

----------
nosy: +benjamin.peterson

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18116>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to