Chris Lamb wrote: > Apt seems to produce some strange output when piped through 'tee' This can be fixed by: --- apt-0.7.14.orig/apt-pkg/deb/dpkgpm.cc +++ apt-0.7.14/apt-pkg/deb/dpkgpm.cc 16:17:48.000000000 +0100 @@ -721,7 +721,6 @@ } else { struct termios rtt; rtt = tt; - cfmakeraw(&rtt); rtt.c_lflag &= ~ECHO; tcsetattr(0, TCSAFLUSH, &rtt); } Alternatively, expanding the cfmakeraw and removing the OPOST configuration: --- apt-0.7.14.orig/apt-pkg/deb/dpkgpm.cc +++ apt-0.7.14/apt-pkg/deb/dpkgpm.cc @@ -721,7 +721,12 @@ } else { struct termios rtt; rtt = tt; - cfmakeraw(&rtt); + rtt.c_iflag &= \ ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + rtt.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + rtt.c_cflag &= ~(CSIZE|PARENB); + rtt.c_cflag |= CS8; + rtt.c_cc[VMIN] = 1; + rtt.c_cc[VTIME] = 0; rtt.c_lflag &= ~ECHO; tcsetattr(0, TCSAFLUSH, &rtt); } (Thanks to Bradley Smith <brad@brad-smith.co.uk> for locating the call.) Any comments? Regards, -- Chris Lamb, UK chris@chris-lamb.co.uk GPG: 0x634F9A20
Attachment:
signature.asc
Description: PGP signature