More questions about how to issue a C-SHELL command within a C program
jian at kuhub.cc.ukans.edu
jian at kuhub.cc.ukans.edu
Thu Aug 16 00:09:17 AEST 1990
Yesterday I asked for help about how to issue a C-SHELL command within a C
program. I was lucky: serveral people came up with immediate answers. I very
much appreciate those answers.
According to the answers and what I read from the menu, system() and execlp()
should work without any doubts. However, I can't make it. What I want to do
is to issue a csh command to change terminal type within a C program. I did
try:
system("csh -cf \"setenv TERM adm3a");
and
system("/bin/csh -c 'setenv TERM adm3a");
and
execlp("/bin/csh", "csh", "-c", "setenv TERM adm3a", (char *) 0);
There was not any runtime errors if I embeded one of above statements into my
C program. But none of them can change the terminal type. I don't know why.
Would someone point me another way to change terminal type within a C program
or give me some hints what I did wrong. I would appreciate any helps.
Jian Q. Li
jian at kuhub.cc.ukans.edu
More information about the Comp.unix.questions
mailing list