🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #450

Re: Curses/initscr() steps on the user environment

#450
From: Chris Sylvain
Date: Sat, 06 Dec 1986 06:58
34 lines
1924 bytes
In article <1936@tektools.UUCP> kathyv@tektools.tek.com (Kathy Vineyard) writes:
>Index:	/usr/src/usr.lib/libcurses/cr_tty.c 4.3BSD
>
>Description:
>	When running a program that uses curses, the user environment
>	was sometimes getting stepped on.  This resulted in getting the
>	famed "x: is not an identifier" from /bin/sh when it was
>	exec'd.  This happened only when using a termcap which had
>	multiple names ( > 2 ) for the termcap entry, the third name of
>	the entry was the one being used by the user, and the length of
>	that third name was at least 2 less than the length of the
>	second name.
>
>Repeat-By:
>	Use a termcap which has it's names set up like:
>
>	   Mc|aaa-c|aaa|aaa with separate scrolling and editing areas:\
>

My environment was always getting stepped on. I was using the FIRST name
in the termcap entry. My termcap entry is:
# "00: is not an identifier" entry
h5|h1500|H5|H1500|haz1500|HAZ1500|hazeltine 1500:\

The fourth item pointed to in the array of pointers pointed to by environ
was getting set to the null terminated string "00". I isolated initscr()
as the culprit using dbx about 15 mins ago.

-- 
--==---==---==--
.. And hast thou slain the Jabberwock? ..

ARPA: cgs@umd5.UMD.EDU     BITNET: cgs%umd5@umd2
UUCP: ..!seismo!umd5.umd.edu!cgs
Technical Details
Message-ID: <1387@umd5>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mimsy!cvl!umd5!cgs
References: <1936@tektools.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mimsy!cvl!umd5!cgs
From: cgs@umd5 (Chris Sylvain)
Newsgroups: comp.bugs.4bsd
Subject: Re: Curses/initscr() steps on the user environment
Message-ID: <1387@umd5>
Date: Sat, 6-Dec-86 01:58:42 EST
Article-I.D.: umd5.1387
Posted: Sat Dec  6 01:58:42 1986
Date-Received: Sun, 7-Dec-86 03:31:32 EST
References: <1936@tektools.UUCP>
Reply-To: cgs@umd5.umd.edu (Chris Sylvain)
Distribution: world
Organization: University of Maryland, College Park
Lines: 34
Keywords: initscr(), "x: is not an identifier", environment