🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #59

A few bugs in readline.c

#59
From: Michael J Spitzer
Date: Sat, 24 Jun 1989 15:43
45 lines
1856 bytes
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 ----
Technical Details
Message-ID: <8906241543.AA25756@mentor.cc.purdue.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MENTOR.CC.PURDUE.EDU!mjs

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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