Sticky IBM C programming problems (summary of replies)
Rich Walters
raw at math.arizona.edu
Fri Mar 2 10:25:09 AEST 1990
In article <9003012109.AA07700 at ei.ecn.purdue.edu> tlmfe at 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 this is in a UNIX machine:
The program is run in a separate shell unless you explicitly run it in the
current shell (not recommened.) Thus the program only 'sees' the envirion-
ment variables that are explicitly EXPORTED from your login shell.
I am fairly sure that this is correct for the bourne shell and the korn shell.
I don't know about the c shell.
Richard Walter
-------------------------------------------------------------------------------
Keep on crunching those numbers
-------------------------------------------------------------------------------
More information about the Comp.lang.c
mailing list