More questions about how to issue a C-SHELL command within a C program
Doug Gwyn
gwyn at smoke.BRL.MIL
Fri Aug 17 00:22:10 AEST 1990
In article <25285.26c9113d at kuhub.cc.ukans.edu> jian at 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).
More information about the Comp.unix.questions
mailing list