Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MENTOR.CC.PURDUE.EDU!mjs From: mjs@MENTOR.CC.PURDUE.EDU (Michael J Spitzer) Newsgroups: gnu.bash.bug Subject: A few bugs in readline.c Message-ID: <8906241543.AA25756@mentor.cc.purdue.edu> Date: 24 Jun 89 15:43:27 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 45 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 ----