# environ_set

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/environ.c#L112
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-environ_set/

```c
void environ_set(struct environ *env, const char *name, int flags, const char *fmt,...)
```

## Parameters

- `env` (`struct environ *`)
- `name` (`const char *`)
- `flags` (`int`)
- `fmt` (`const char *`)
- `` (`...`)

## Called by

- [`cmd_set_environment_exec`](/en/tmux/3.7c/reference/c-function-cmd-set-environment-c-cmd_set_environment_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-set-environment.c#L113)
- [`environ_copy`](/en/tmux/3.7c/reference/c-function-environ_copy/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/environ.c#L94)
- [`environ_for_session`](/en/tmux/3.7c/reference/c-function-environ_for_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/environ.c#L265)
- [`environ_put`](/en/tmux/3.7c/reference/c-function-environ_put/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/environ.c#L165)
- [`environ_update`](/en/tmux/3.7c/reference/c-function-environ_update/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/environ.c#L203)
- [`job_run`](/en/tmux/3.7c/reference/c-function-job_run/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/job.c#L144)
- [`main`](/en/tmux/3.7c/reference/c-function-main/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tmux.c#L404)
- [`spawn_pane`](/en/tmux/3.7c/reference/c-function-spawn_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/spawn.c#L325)

## Calls

- [`xmalloc`](/en/tmux/3.7c/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/environ.c#L124)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/environ.c#L125)
- [`xvasprintf`](/en/tmux/3.7c/reference/c-function-xvasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/environ.c#L122)

## Other function references

- [`environ_find`](/en/tmux/3.7c/reference/c-function-environ_find/) (function)

## Referenced declarations

- [`environ`](/en/tmux/3.7c/reference/c-struct-environ/) (struct)
- [`environ_entry.flags`](/en/tmux/3.7c/reference/c-struct-environ_entry-flags/) (attribute)
- [`environ_entry.name`](/en/tmux/3.7c/reference/c-struct-environ_entry-name/) (attribute)
- [`environ_entry.value`](/en/tmux/3.7c/reference/c-struct-environ_entry-value/) (attribute)
