Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
unsetenv - Remove an environment variable
&pagelevel(4)&pagelevel
Definition | #include <stdlib.h> int unsetenv (const char *name); The unsetenv function removes an environment variable from the environment of the calling process. The name argument points to a string, which is the name of the variable to be removed. This string shall not contain an '=' character. If the named variable does not exist in the current environment, the environment remains unchanged and the function is considered to have completed successfully. If the application modifies environ or the pointers to which it points, the behavior of unsetenv is undefined. The unsetenv function updates the list of pointers to which environ points. |
Return val. | 0 | if successful. |
| -1 | otherwise. errno is set to indicate the error. The environment remains unchanged. |
See also | environ , getenv , malloc , putenv , setenv , stdlib.h , section “Environment variables”.
|