Setting environment from inside a pg.

Sunil Gangwani gangwani at andromeda.rutgers.edu.rutgers.edu
Sun Nov 25 16:58:12 AEST 1990


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 at andromeda.rutgers.edu because
due to heavy traffic our facility removes USENET stuff every two
days...

thanks in advance


Sunil Gangwani



More information about the Comp.lang.c mailing list