Questions about putenv() and setenv()
I have been thinking a little about environment variables and have a few questions/observations. putenv(char *string); This call seems fatally flawed. Because it doesn't copy the passed string you can't call it with a local and there is no guarantee a heap allocated string won't be overwritten or accidentally deleted. Furthermore (though I haven't tested it), since one use of environment variables is to pass values to child's environment this seems useless if the child calls one of the exec*() functions. Am I wrong in that? The Linux man page indicates that glibc 2.0-2.1.1 abandoned the above