NetBSD Problem Report #45006

From  Tue May 31 02:56:30 2011
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 7082E63BA4F
	for <>; Tue, 31 May 2011 02:56:30 +0000 (UTC)
Message-Id: <>
Date: Mon, 30 May 2011 18:45:31 -0700 (PDT)
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
International Organization of Internet Clock Watchers

System: NetBSD 5.1_STABLE NetBSD 5.1_STABLE (FLAPJACK2) #2: Wed May 18 13:17:14 PDT 2011 sparc64
Architecture: sparc64
Machine: sparc64
	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.

	% unsetenv TERM
	% vi
	ex/vi: Error: unknown: Invalid argument




State-Changed-From-To: open->pending-pullups
State-Changed-When: Sun, 12 Feb 2012 12:19:25 +0000
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-When: Sun, 01 Apr 2012 07:49:28 +0000
pullup completed


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.