NetBSD Problem Report #45006

From fair@digital.clock.org  Tue May 31 02:56:30 2011
Return-Path: <fair@digital.clock.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 7082E63BA4F
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 31 May 2011 02:56:30 +0000 (UTC)
Message-Id: <20110531014531.4FE893ACC2@digital.clock.org>
Date: Mon, 30 May 2011 18:45:31 -0700 (PDT)
From: fair@netbsd.org
Reply-To: fair@netbsd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: nvi gives nonsense error when TERM environment variable unset
X-Send-Pr-Version: 3.95

>Number:         45006
>Category:       bin
>Synopsis:       nvi gives nonsense error when TERM environment variable unset
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 31 03:00:00 +0000 2011
>Closed-Date:    Sun Apr 01 07:49:28 +0000 2012
>Last-Modified:  Sun Apr 01 07:49:28 +0000 2012
>Originator:     Erik E. Fair
>Release:        NetBSD 5.1_STABLE
>Organization:
International Organization of Internet Clock Watchers
>Environment:


System: NetBSD digital.clock.org 5.1_STABLE NetBSD 5.1_STABLE (FLAPJACK2) #2: Wed May 18 13:17:14 PDT 2011 root@digital.clock.org:/var/obj/sys/arch/sparc64/compile/FLAPJACK2 sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	When nvi is started as "vi" and the TERM environment variable is unset,
	nvi gives a nonsense error and exits with a non-zero status. This is a
	regression from original "vi" which would revert to "ex" line editing mode
	under these circumstances.

	This is particularly annoying when attempting to use vipw(8) in single
	user mode of a freshly booted NetBSD system (when TERM is unlikely to
	be set), and is likely to be confusing to less experienced system
	administrators. It certainly violates the principle of least astonishment.

>How-To-Repeat:
	/bin/csh
	% unsetenv TERM
	% vi
	ex/vi: Error: unknown: Invalid argument
	% 

>Fix:




>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->pending-pullups
State-Changed-By: spz@NetBSD.org
State-Changed-When: Sun, 12 Feb 2012 12:19:25 +0000
State-Changed-Why:
fixed by revision 1.3 of src/dist/nvi/cl/cl_main.c on 2009/10/20 16:17:07
by tnn:
Print a warning if TERM is not set and stdin is a tty. PR bin/42144.

Pullup-5 #1723


State-Changed-From-To: pending-pullups->closed
State-Changed-By: spz@NetBSD.org
State-Changed-When: Sun, 01 Apr 2012 07:49:28 +0000
State-Changed-Why:
pullup completed
.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.