Game Guides > Game FAQ >  

How could he easily return PATH to its original value

How could he easily return PATH to its original value
Save the old value, before you change it!

char *old_path = strdup (getenv ("PATH"));
putenv ("PATH=/new/path");
...
sprintf (tmp, "PATH=%s", old_path);
putenv (tmp);
free (old_path);