File:  [Plan 9 NeXT] / lucent / sys / man / 3 / env
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:01:01 2018 UTC (8 years, 1 month ago) by root
Branches: lucent, MAIN
CVS tags: plan9, HEAD
Plan 9 NeXT

.TH ENV 3
.SH NAME
env \- environment variables
.SH SYNOPSIS
.nf
.B bind #e /env

.BI /env/ var1
.BI /env/ var2
 ...
.fi
.SH DESCRIPTION
The
.I env
device serves a one-level directory containing files with arbitrary names
and contents.
The intention is that the file name is the name of an
.I environment variable
(see
.IR rc (1)),
and the content is the variable's current value.
.PP
When a
.IR fork (2)
system call creates a new process, both the parent and the
child continue to see exactly the same files in the
.I env
device: changes made in either process can be noticed by the other.
In contrast, an
.B rfork
system call with the
.B RFENVG
bit set (see
.IR fork (2))
causes a split: initially both process groups see the
same environment files, but any changes made in one process group
cannot be noticed by the other.
An
.B rfork
with
.B RFCENVG
splits and then clears the environment.
.SH SEE ALSO
.IR rc (1),
.IR fork (2)
.SH SOURCE
.B /sys/src/9/port/devenv.c
.SH BUGS
A write starting at an offset after the current extent of a file
yields an error instead of zero filling.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.