Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Mar 2009 08:09:16 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r190253 - stable/7/bin/sh
Message-ID:  <200903220809.n2M89GAr061659@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sun Mar 22 08:09:16 2009
New Revision: 190253
URL: http://svn.freebsd.org/changeset/base/190253

Log:
  MFC:
  
    Don't disable CR-to-NL translation when waiting for data to arrive.
  
    A difference between the old and the new TTY layer is that the new
    implementation does not perform any post-processing before returning
    data back to userspace when calling read().
  
    sh(1)'s read turns the TTY into a raw mode before calling select(). This
    means that the first character will not receive any ICRNL processing.
    Inherit this flag from the original terminal attributes.
  
    Even though this issue is not present on RELENG_*, I'm MFCing it to make
    sh(1) in jails behave better.
  
    PR:		bin/129566

Modified:
  stable/7/bin/sh/   (props changed)
  stable/7/bin/sh/miscbltin.c

Modified: stable/7/bin/sh/miscbltin.c
==============================================================================
--- stable/7/bin/sh/miscbltin.c	Sun Mar 22 06:47:29 2009	(r190252)
+++ stable/7/bin/sh/miscbltin.c	Sun Mar 22 08:09:16 2009	(r190253)
@@ -147,6 +147,7 @@ readcmd(int argc __unused, char **argv _
 		if (tcgetattr(0, &told) == 0) {
 			memcpy(&tnew, &told, sizeof(told));
 			cfmakeraw(&tnew);
+			tnew.c_iflag |= told.c_iflag & ICRNL;
 			tcsetattr(0, TCSANOW, &tnew);
 			tsaved = 1;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903220809.n2M89GAr061659>