mjs@MENTOR.CC.PURDUE.EDU (Michael J Spitzer) (06/24/89)
Two bugs in the BSD implementation of rl_prep_terminal: 1. Despite comments claiming otherwise, bash doesn't examine the tty modes between commands. This makes "stty" useless for changing terminal modes. Repeat by "stty -echo" -- notice that everything still echoes. 2. For no apparent reason, bash turns off CRMOD while prompting for a command. This causes problems with background jobs printing output since \n is no longer mapped to \r\n. Repeat by running printing background jobs on a terminal that doesn't automatically map LF to CRLF. -mjs *** /tmp/,RCSt1025582 Sat Jun 24 10:34:27 1989 --- /userb/mjs/gnu/src/bash/dist-bash/readline.c Sat Jun 24 10:17:31 1989 *************** *** 1498,1504 **** int tty = fileno (rl_instream); /* We always get the latest tty values. Maybe stty changed them. */ ! #if 1 /* NEVER */ if (!original_tty_flags) { ioctl (tty, TIOCGETP, &the_ttybuff); --- 1498,1504 ---- int tty = fileno (rl_instream); /* We always get the latest tty values. Maybe stty changed them. */ ! #if 0 /* NEVER */ if (!original_tty_flags) { ioctl (tty, TIOCGETP, &the_ttybuff); *************** *** 1517,1523 **** the_ttybuff.sg_flags &= ~ECHO; } the_ttybuff.sg_flags |= CBREAK; - the_ttybuff.sg_flags &= ~CRMOD; ioctl (tty, TIOCSETN, &the_ttybuff); } --- 1517,1522 ----