Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!galaxy.rutgers.edu!andromeda.rutgers.edu!gangwani From: gangwani@andromeda.rutgers.edu.rutgers.edu (Sunil Gangwani) Newsgroups: comp.lang.c Subject: Setting environment from inside a pg. Keywords: C, environment, DOS Message-ID: Date: 25 Nov 90 05:58:12 GMT Sender: news@galaxy.rutgers.edu Reply-To: gangwani@andromeda (Sunil Gangwani) Distribution: usa Organization: Rutgers University, Newark, NJ Lines: 23 Nntp-Posting-Host: andromeda.rutgers.edu Hi, With the system() function call a new shell is executed in DOS or UNIX. I would like the set an environment variable from inside a program so that the variable exists when I exit the program?? Ex. in DOS system("set var=Hello"); The above will not work because a new command.com is executed and exited immediately. How can I overcome this simple problem?? Please respond directly to gangwani@andromeda.rutgers.edu because due to heavy traffic our facility removes USENET stuff every two days... thanks in advance Sunil Gangwani