[manual index][section index]


env - environment device


bind #e /env



The environment device serves a one-level directory giving access to environment variables and their values. It is conventionally bound to /env. The value of an environment variable name may be obtained by reading the file /env/name. If the file does not exist, the variable is unset and has the value nil. The maximum length of a variable name is 127 bytes.

New environment variables are set by creating the corresponding file in /env and writing the required value to that file. Similarly environment variables are destroyed (unset) by removing the corresponding file.

Processes sharing an `environment group' see the same files and contents; changes made by one process are seen by the others. A process can insulate itself from further changes using the FORKENV option to sys-pctl(2), which creates a new environment group that is a copy of the old, but further changes in each are independent. A new empty environment group is created by the NEWENV option to sys-pctl(2).




env(1), sh(1), env(2), sys-pctl(2)

ENV(3 ) Rev:  Tue Mar 31 02:42:38 GMT 2015