NetBSD Problem Report #40144
From bad@bsd.de Tue Dec 9 17:19:58 2008
Return-Path: <bad@bsd.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 2B59263B121
for <gnats-bugs@gnats.NetBSD.org>; Tue, 9 Dec 2008 17:19:58 +0000 (UTC)
Message-Id: <20081209164353.8AA079184@irregular-apocalypse.k.bsd.de>
Date: Tue, 9 Dec 2008 17:43:53 +0100 (CET)
From: bad@bsd.de
Reply-To: bad@bsd.de
To: gnats-bugs@gnats.NetBSD.org
Subject: quiting from vi recovery mode leaves tty settings garbled
X-Send-Pr-Version: 3.95
>Number: 40144
>Category: bin
>Synopsis: quiting from vi recovery mode leaves tty settings garbled
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 09 17:20:01 +0000 2008
>Closed-Date: Tue Dec 09 18:26:47 +0000 2008
>Last-Modified: Tue Jan 20 02:55:05 +0000 2009
>Originator: Christoph Badura
>Release: NetBSD 5.99.3
>Organization:
>Environment:
System: NetBSD not-invented-here 5.99.3 NetBSD 5.99.3 (XEN2_DOMU) #0: Sat Nov 29 02:51:07 PST 2008 builds@wb35:/home/builds/ab/HEAD/i386/200811290002Z-obj/home/builds/ab/HEAD/src/sys/arch/i386/compile/XEN2_DOMU i386
Architecture: i386
Machine: i386
>Description:
vi doesn't restore the tty modes when leaving recovery mode with ":q!".
At least echo is still turned of and nlcr isn't enabled.
>How-To-Repeat:
touch zorch
vi zorch
:pres
:q
vi -r zorch
:q!
>Fix:
Dunno.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Tue, 09 Dec 2008 13:26:47 -0500
State-Changed-Why:
fixed, thanks
From: Christos Zoulas <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/40144 CVS commit: src/dist/nvi/common
Date: Tue, 9 Dec 2008 18:26:20 +0000 (UTC)
Module Name: src
Committed By: christos
Date: Tue Dec 9 18:26:20 UTC 2008
Modified Files:
src/dist/nvi/common: exf.c
Log Message:
PR/40144: Christoph Badura: quiting from vi recovery mode leaves tty settings
garbled. When vi creates a new EXF structure it did not set all the fd related
fields to -1, so if the fd field was never initialized, it was 0 because of
the calloc() call, so closing the file, ended up closing 0, so the terminal
fd was closed and that prevented the ioctl to restore the term settings from
succeeding.
To generate a diff of this commit:
cvs rdiff -r1.2 -r1.3 src/dist/nvi/common/exf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/40144 CVS commit: [netbsd-5] src/dist/nvi/common
Date: Tue, 20 Jan 2009 02:51:13 +0000 (UTC)
Module Name: src
Committed By: snj
Date: Tue Jan 20 02:51:13 UTC 2009
Modified Files:
src/dist/nvi/common [netbsd-5]: exf.c
Log Message:
Pull up following revision(s) (requested by lukem in ticket #292):
dist/nvi/common/exf.c: revision 1.3
PR/40144: Christoph Badura: quiting from vi recovery mode leaves tty settings
garbled. When vi creates a new EXF structure it did not set all the fd related
fields to -1, so if the fd field was never initialized, it was 0 because of
the calloc() call, so closing the file, ended up closing 0, so the terminal
fd was closed and that prevented the ioctl to restore the term settings from
succeeding.
To generate a diff of this commit:
cvs rdiff -r1.1.1.2.6.1 -r1.1.1.2.6.2 src/dist/nvi/common/exf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.