From nobody@FreeBSD.org  Sat Dec 17 01:51:22 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7EDE716A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 17 Dec 2005 01:51:22 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3B4E543D46
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 17 Dec 2005 01:51:21 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id jBH1pLW5027509
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 17 Dec 2005 01:51:21 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id jBH1pLmQ027508;
	Sat, 17 Dec 2005 01:51:21 GMT
	(envelope-from nobody)
Message-Id: <200512170151.jBH1pLmQ027508@www.freebsd.org>
Date: Sat, 17 Dec 2005 01:51:21 GMT
From: Yuri <yuri@tsoft.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: reset doesn't fully restore terminal state
X-Send-Pr-Version: www-2.3

>Number:         90524
>Category:       bin
>Synopsis:       reset(1) doesn't fully restore terminal state
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 17 02:00:09 GMT 2005
>Closed-Date:    
>Last-Modified:  Wed Jan 18 07:45:35 GMT 2006
>Originator:     Yuri
>Release:        6.0-RELEASE
>Organization:
NA
>Environment:
FreeBSD xxx.xxx.xxx 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov  3 09:36:13 UTC 2005     root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
If I kill vim (ex. kill -9) key mapping changes and backspace key causes
printing of ^? instead of removing of the current character in terminal.

'reset' command doesn't restore this either. so it's no way to restore
original setting besides of running the command 'stty erase ^?'

Originally 'stty -a' reports:
-----------begin------------------------
speed 38400 baud; 42 rows; 189 columns;
lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl
        -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
        -extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
        brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
        -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
        eol2 = <undef>; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U;
        lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
        status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
-------------end------------------------

After killing vim and running 'reset' 'stty -a' reports:
-----------begin------------------------
speed 38400 baud; 42 rows; 189 columns;
lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl
        -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
        -extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff -ixany imaxbel -ignbrk
        brkint -inpck ignpar -parmrk
oflags: opost onlcr -ocrnl oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
        -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^@; eof = ^D; eol = <undef>;
        eol2 = <undef>; erase = ^H; erase2 = ^H; intr = ^C; kill = ^U;
        lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
        status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
-------------end------------------------

because 'erase = ^H' particularly backspace key is disrupted.

>How-To-Repeat:
see full description
>Fix:
N/A
>Release-Note:
>Audit-Trail:
>Unformatted:
