...
Code Block | ||
---|---|---|
| ||
char *temp; char *tmpvarcopy; if ((temp = getenv("TEMPTEST_ENV")) != NULL) { tmpvarcopy= malloc(strlen(temp) + 1); if (tmpvarcopy != NULL) strcpy(tmpvarcopy, temp); else /* handle error condition */ tmpvarcopy[0] = 'a'; setenv("TEMPTEST_ENV", tmpvarcopy, 1); } else { return -1; } |
...
Wiki Markup |
---|
\[[ISO/IEC 9899-1999:TC2|AA. C References#ISO/IEC 9899-19991999TC]\] Section 7.20.4, "Communication with the environment" |