Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site codas.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!akguc!codas!mikel From: mikel@codas.UUCP (Mikel Manitius) Newsgroups: net.lang.c Subject: Re: Setenv from C Message-ID: <156@codas.UUCP> Date: Sat, 5-Oct-85 23:13:48 EDT Article-I.D.: codas.156 Posted: Sat Oct 5 23:13:48 1985 Date-Received: Mon, 7-Oct-85 04:05:32 EDT References: <1693@brl-tgr.ARPA> Organization: AT&T Information Systems (SDSS) - Orlando Lines: 30 > /* > > Is it possible to set a csh environment variable within a C program? I know > > about getenv(), but have failed at attempts to set an environment variable > > from a C program. Basically, what I want to do is "source" a new environment > > variable for the current csh process. Any comments or suggestions would be > > appreciated. Thanks. > > In a word NO! There is no way to affect your parent's environment unless > they made prior arrangements (like before you were born) to do so. > Sounds kinda like Life, doesn't it? > > [ ... examples of kludges deleted ... ] Yet Another Way Neglected (kind of like YACC, but YAWN :-}): eval `prog` have "prog" generate the following output: set home=/usr/mikel setenv FOOBAR dodo For further usage of eval, consult your manuals. -- ======= Mikel Manitius ==----===== AT&T (305) 869-2462 RNX: 755 ==------===== Information Systems ...{akguc|ihnp4}!codas!mikel ===----====== SDSS Regional Support ...attmail!mmanitius =========== Altamonte Springs, FL My opinions are my own. =======