Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn) Newsgroups: net.lang.c Subject: Re: setenv from c Message-ID: <1642@brl-tgr.ARPA> Date: Sun, 22-Sep-85 06:48:13 EDT Article-I.D.: brl-tgr.1642 Posted: Sun Sep 22 06:48:13 1985 Date-Received: Wed, 25-Sep-85 07:07:34 EDT References: <2936@ncsu.UUCP> Organization: Ballistic Research Lab Lines: 12 > 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. There seems to be some confusion here. A program invoked from the shell is a child process of the shell, not "the current process". A child process cannot affect the environment of its parent, so the answer is "No". The environment is not a csh-specific concept; see ENVIRON(5 or 4).