Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!kuhub.cc.ukans.edu!jian From: jian@kuhub.cc.ukans.edu Newsgroups: comp.unix.questions Subject: More questions about how to issue a C-SHELL command within a C program Message-ID: <25285.26c9113d@kuhub.cc.ukans.edu> Date: 15 Aug 90 14:09:17 GMT Organization: University of Kansas Academic Computing Services Lines: 22 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@kuhub.cc.ukans.edu