Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!yale!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: More questions about how to issue a C-SHELL command within a C program Message-ID: <13600@smoke.BRL.MIL> Date: 16 Aug 90 14:22:10 GMT References: <25285.26c9113d@kuhub.cc.ukans.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 13 In article <25285.26c9113d@kuhub.cc.ukans.edu> jian@kuhub.cc.ukans.edu writes: > system("/bin/csh -c 'setenv TERM adm3a"); (You're missing a quote ') >But none of them can change the terminal type. I don't know why. Your problem is that no change made to the environment variables of a subprocess can affect the environment variables of an ancestor process. This is why most of us make sure our TERM environment variable is properly set up by a file that is SOURCED, not executed in a subprocess, when our shell starts up (e.g. .profile or .login).