When copying the terminal attributes to the pty, be sure not to set ONLCR.
This prevents extra carriage returns from ending up in the script output file.
This commit is contained in:
4
term.c
4
term.c
@@ -191,6 +191,8 @@ term_copy(src, dst)
|
||||
|
||||
if (tcgetattr(src, &tt) != 0)
|
||||
return(0);
|
||||
/* Do not convert line endings from NL to NLCR. */
|
||||
CRL(tt.c_oflag, ONLCR);
|
||||
if (tcsetattr(dst, TCSAFLUSH, &tt) != 0)
|
||||
return(0);
|
||||
return(1);
|
||||
@@ -249,6 +251,8 @@ term_copy(src, dst)
|
||||
ioctl(src, TIOCLGET, &lb)) {
|
||||
return(0);
|
||||
}
|
||||
/* Do not convert line endings from NL to NLCR. */
|
||||
CLR(b.sg_flags, CRMOD);
|
||||
if (ioctl(dst, TIOCSETP, &b) != 0 || ioctl(dst, TIOCSETC, &tc) != 0 ||
|
||||
ioctl(dst, TIOCSLTC, &lc) != 0 || ioctl(dst, TIOCLSET, &lb) != 0 ||
|
||||
ioctl(dst, TIOCSETD, &l) != 0) {
|
||||
|
Reference in New Issue
Block a user