Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!ogicse!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.unix.questions Subject: Re: More questions about how to issue a C-SHELL command within a C program Message-ID: <1990Aug16.073452.4223@iwarp.intel.com> Date: 16 Aug 90 07:34:52 GMT References: <25285.26c9113d@kuhub.cc.ukans.edu> <1990Aug15.221504.348@iwarp.intel.com> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 17 In-Reply-To: fpb@ittc.wec.com (Frank P. Bresz) In article , fpb@ittc (Frank P. Bresz) writes: | Why not just use the putenv system call with something akin to: | | putenv("TERM=adm3a"); /* notify subprocess that it is an adm3a terminal */ Nope. That changes the *current* process (the C program), not the parent process (the parent shell). You *must* involve the parent process if you want programs invoked after the C program to see the change (unless you intend the C program to perform all the future invocations... yuck). Just another UNIX hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/