64 lines · 1.4 KB · Text
RawDownload
.TH ENV 3.SH NAMEenv \- environment variables.SH SYNOPSIS.nf.B bind #e /env .BI /env/ var1.BI /env/ var2 ....fi.SH DESCRIPTIONThe.I envdevice serves a one-level directory containing files with arbitrary namesand 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..PPWhen a.IR fork (2)system call creates a new process, both the parent and thechild continue to see exactly the same files in the.I envdevice: changes made in either process can be noticed by the other.In contrast, an.B rforksystem call with the.B RFENVGbit set (see.IR fork (2))causes a split: initially both process groups see thesame environment files, but any changes made in one process groupcannot be noticed by the other.An.B rforkwith.B RFCENVGsplits and then clears the environment..PPThe special global environment.B #eccontains kernel configuration variables,such as those set in .IR plan9.ini (8).All processes see the same.BR #ec ;its contents are writable only by the host owner.[XXX actually everything is world writable; that's a mistake.].SH SEE ALSO.IR rc (1),.IR fork (2),.B #c/rebootin.IR cons (3),.IR plan9.ini (8).SH SOURCE.B /sys/src/9/port/devenv.c.SH BUGSA write starting at an offset after the current extent of a fileyields an error instead of zero filling.