Annotation of lucent/sys/man/3/env, revision 1.1.1.1

1.1       root        1: .TH ENV 3
                      2: .SH NAME
                      3: env \- environment variables
                      4: .SH SYNOPSIS
                      5: .nf
                      6: .B bind #e /env
                      7: 
                      8: .BI /env/ var1
                      9: .BI /env/ var2
                     10:  ...
                     11: .fi
                     12: .SH DESCRIPTION
                     13: The
                     14: .I env
                     15: device serves a one-level directory containing files with arbitrary names
                     16: and contents.
                     17: The intention is that the file name is the name of an
                     18: .I environment variable
                     19: (see
                     20: .IR rc (1)),
                     21: and the content is the variable's current value.
                     22: .PP
                     23: When a
                     24: .IR fork (2)
                     25: system call creates a new process, both the parent and the
                     26: child continue to see exactly the same files in the
                     27: .I env
                     28: device: changes made in either process can be noticed by the other.
                     29: In contrast, an
                     30: .B rfork
                     31: system call with the
                     32: .B RFENVG
                     33: bit set (see
                     34: .IR fork (2))
                     35: causes a split: initially both process groups see the
                     36: same environment files, but any changes made in one process group
                     37: cannot be noticed by the other.
                     38: An
                     39: .B rfork
                     40: with
                     41: .B RFCENVG
                     42: splits and then clears the environment.
                     43: .SH SEE ALSO
                     44: .IR rc (1),
                     45: .IR fork (2)
                     46: .SH SOURCE
                     47: .B /sys/src/9/port/devenv.c
                     48: .SH BUGS
                     49: A write starting at an offset after the current extent of a file
                     50: 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.