Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Sticky IBM C programming problems (summary of replies)
Message-ID: <1990Mar2.171538.1287@utzoo.uucp>
Organization: U of Toronto Zoology
References: <90055.142524CMH117@psuvm.psu.edu> <9003012109.AA07700@ei.ecn.purdue.edu>
Date: Fri, 2 Mar 90 17:15:38 GMT

In article <9003012109.AA07700@ei.ecn.purdue.edu> tlmfe@EE.ECN.PURDUE.EDU (Mark B Strong) writes:
>Quick question:  Why won't an environmental variable I change within
>a C program stay after the program is terminated?  Setenv() doesn't seem
>to work?  

Assuming you are running on a Unix system...  The environment variables
your program gets are *copies* of those in its parent shell, and are in
the program's own address space.  There is no way for the program to
affect its parent's variables.
-- 
MSDOS, abbrev:  Maybe SomeDay |     Henry Spencer at U of Toronto Zoology
an Operating System.          | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
