Tcl\_PutEnv(3) Tcl Library Procedures Tcl\_PutEnv(3)

```

```

# [NAME](#NAME)

Tcl\_PutEnv - procedures to manipulate the environment

# [SYNOPSIS](#SYNOPSIS)

```
#include <tcl.h>

int
Tcl_PutEnv(assignment)
```

# [ARGUMENTS](#ARGUMENTS)

const char *\*assignment* (in)

Info about environment variable in the format “*NAME=value*”. The *assignment* argument is in the system encoding.

```
    
```

# [DESCRIPTION](#DESCRIPTION)

**Tcl\_PutEnv** sets an environment variable. The information is passed in a single string of the form “*NAME=value*”. This procedure is intended to be a stand-in for the UNIX **putenv** system call. All Tcl-based applications using **putenv** should redefine it to **Tcl\_PutEnv** so that they will interface properly to the Tcl runtime.

# [SEE ALSO](#SEE_ALSO)

[env(n)](/man/os/tcl/env.n)

# [KEYWORDS](#KEYWORDS)

environment, variable

7.5 Tcl

---

Document: Tcl_PutEnv(3) from tcl 9.1.0-r1 (Chainguard OS)
Source: https://downloads.sourceforge.net/project/tcl/Tcl/9.1.0/tcl9.1.0-src.tar.gz
