PuTTY bug unix-stderr-opost

summary: When stdout and stderr are ttys, plink's messages stair-stepclass: bug: This is clearly an actual problem we want fixed.difficulty: tricky: Needs many tuits.priority: medium: This should be fixed one day.absent-in: 0.58present-in: 2005-04-27fixed-in: r7745 2007-09-30 (0.61) (0.62)

When running in a terminal and requesting a pty on the server, the
Unix port of Plink turns off OPOST. It does this to ensure that if an
application on the server turns off OPOST in its pty and sends a bare
LF, that will make it all the way to Plink's terminal. This, though,
causes the problem that if Plink's stderr goes to the same terminal as
its stout (the usual situation), Plink's own messages, sent to stderr,
won't get their '\n's translated to CRLF.
The fix for this is to turn on OPOST around any internally-generated
writes to stderr. This is easier said than done since there are many
writes to stderr in uxcons.c, and at least one in logging.c. In
addition, the writes from (e.g.) ssh.c of application data should
probably not be affected.