forsyth20121205-174063a80cc13 years agoHistory
86 lines · 1.8 KB · Text
RawDownload
.TH SRV 3.SH NAMEsrv \- server registry.SH SYNOPSIS.BI "bind #s"[.I spec].B /chan.PP.EXsys->bind("#s\fIspec\fP", "/chan", Sys->MREPL);.EE.SH DESCRIPTION.I Srvconverts between file system operations by applicationsand messages on channels, as described in.IR sys-file2chan (2).Each attach that does not include a.I specproduces a new instance: an empty directory ownedby the current user in which only filesmay be created, and then only by.IR sys-file2chan ,using a special internal interface.Each such file initially has the same owner as thedirectory, and permissions.B 8r600(read-write for the owner only),but the permissions can be changed by.BR Sys->wstat(see.IR sys-stat (2))and thus.IR chmod (1).If mode.B Sys->DMEXCLis thereby set, the file becomes exclusive-use and can be opened byonly one process at a time.The file length andmode bit.B Sys->DMAPPENDmay also be set by.B wstatbut are not interpreted by the system..PPFiles may be removed, directly using.IR sys-remove (2)(and thus.IR rm (1)),or indirectly by opening them with mode.B Sys->ORCLOSE(see.IR sys-open (2))..I File2chanalso removes the corresponding file when the last referencesto the server's read and write channels have gone(eg, on server exit)..PPA.I specmay be given to name specific instances of.IR srv ,so that a new name space can bind in a service created in another.Only the owner (original creator) of the instance may attach to it,unless the mode of the service directory is changedusing.B Sys->wstat(see.IR sys-stat (2))to have general access..SH FILES.TF /chan.TP.B /chandirectory to which.I srvis conventionally bound by various applications.SH SOURCE.B /emu/port/devsrv.c.br.B /os/port/devsrv.c.SH SEE ALSO.IR plumb (1),.IR wm (1),.IR sys-file2chan (2)