--- portage.py~ 2007-11-08 21:38:40.000000000 +0100 +++ portage.py 2007-11-08 21:39:55.000000000 +0100 @@ -2565,6 +2565,11 @@ writemsg("openpty failed: '%s'\n" % str(e), noiselevel=1) del e master_fd, slave_fd = os.pipe() + if got_pty: + import termios + mode = termios.tcgetattr(slave_fd) + mode[1] &= ~termios.OPOST + termios.tcsetattr(slave_fd, termios.TCSANOW, mode) # We must set non-blocking mode before we close the slave_fd # since otherwise the fcntl call can fail on FreeBSD (the child