Charles.Forsyth20060303-partialeea662d19 years agoHistory
52 lines · 1.3 KB · Text
RawDownload
.TH ENV 2.SH NAMEenv \- environment module.SH SYNOPSIS.EXinclude "env.m";env = load Env Env->PATH; getenv: fn(var: string): string;setenv: fn(var: string, val: string): int;getall: fn(): list of (string, string);clone:  fn(): int;new:    fn(): int;.EE.SH DESCRIPTION.B Envprovides an interface to manipulate environment variables which may then be shared between processes..B Getenvreturns the value of the environment variable.I varpassed as a parameter,or.B nilif the variable is not set. It doesthis by reading the contents of.BI /env/ var..B Setenvsets the value of the environment variable.I varto.I val.The value may be nil to unset the variable. It does this by writing the string.I valto.BI /env/ var.The routine returns a negative number if it fails to set the variable for any reason..B Getallreturns all the variables in the current environment as a list of (variable, value) pairs..B Clonecopies the current environment and places the process in a new environment group. Changes nowmade to the environment will not affect the environment of other processes..B Newplaces the process in a new empty environment group. Changes made in this new environment willnot affect other processes..SH SOURCE.B /appl/lib/env.b.SH SEE ALSO.IR env (1),.IR sys-pctl (2),.IR env (3)