setenv man page
Prolog
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
setenv — add or change environment variable
Synopsis
#include <stdlib.h> int setenv(const char *envname, const char *envval, int overwrite);
Description.
The setenv() function shall update the list of pointers to which environ points.
The strings described by envname and envval are copied by this function.
The setenv() function need not be thread-safe.. standard developers intended that the traditional method of walking through the environment by way of the environ pointer must be supported.
It was decided that setenv() should be required by this version part of the XSI option..
See also the Rationale section in getenv().
Future Directions
None.
See Also
exec, getenv(), putenv(), unsetenv()
The Base Definitions volume of POSIX.1‐2008, <stdlib.h>,  .