Skip site navigation (1)Skip section navigation (2)
Date:      Wed Sep 11 00:32:04 1996
From:      cedar!jeremy@beaver.cs.washington.edu (Jeremy Scofield)
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/1598: tip leaves OPOST set on controlling terminal
Message-ID:  <199609110739.AAA11821@rocky.cedar.wa.com>
Resent-Message-ID: <199609111310.GAA01756@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1598
>Category:       bin
>Synopsis:       tip leaves OPOST set on controlling terminal (fd 0)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 11 06:10:01 PDT 1996
>Last-Modified:
>Originator:     Jeremy Scofield
>Organization:
Cedar River Software
>Release:        FreeBSD 2.1.5-RELEASE i386
>Environment:

It's not particularly relevant, but my /etc/remote contains

    cuaa1:dv=/dev/cuaa1:br#115200:pa=none

>Description:

The raw() function in tip.c leaves OPOST and ONLCR set on fd 0, which
causes an extra \r to be inserted before each \n.  This is fairly
benign when running line-mode commands (\r\r\n is usually
indistinguishable from \r\n), but causes some pretty strange behavior
when I run vi on the remote system.

I checked tip.c in FreeBSD-current, too.  The bug is still there.

>How-To-Repeat:

    script
    tip cuaa1
	<call remote system>
    ~.
    ^D

The ``typescript'' file will show double \r's at the end of every line.

>Fix:

*** tip.c-orig	Tue Sep 10 23:37:04 1996
--- tip.c	Tue Sep 10 23:37:24 1996
***************
*** 223,228 ****
--- 223,229 ----
  	ctermios.c_iflag = (ISTRIP|IXON|BRKINT);
  	ctermios.c_lflag = (PENDIN|IEXTEN|ISIG|ECHOE);
  #endif
+ 	ctermios.c_oflag = 0;
  	ctermios.c_cflag = (CLOCAL|HUPCL|CREAD|CS8);
  	ctermios.c_cc[VINTR] = 	ctermios.c_cc[VQUIT] = -1;
  	ctermios.c_cc[VSUSP] = ctermios.c_cc[VDSUSP] = ctermios.c_cc[VDISCARD] =
>Audit-Trail:
>Unformatted:



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