Go to the first, previous, next, last section, table of contents.


setenv

Syntax

#include <stdlib.h>

int setenv(const char *name, const char *value, int rewrite);

Description

This function sets the environment variable name to value. If rewrite is set, then this function will replace any existing value. If it is not set, it will only put the variable into the environment if that variable isn't already defined.

Return Value

Zero on success, -1 on failure.

Portability

not ANSI, not POSIX


Go to the first, previous, next, last section, table of contents.