unsetenv - remove an environment variable
#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 that is the name of the variable to be removed. The named argument cannot contain an '=' character. If the named variable does not exist in the current environment, the environment is 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.
Upon successful completion, 0 is returned. Otherwise, -1 is returned, errno set to indicate the error, and the environment is left unchanged.
The unsetenv() function will fail if:
EINVAL
See attributes(5) for descriptions of the following attributes:
|
getenv(3C), setenv(3C), attributes(5), standards(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |