diff --git a/lib/namespace b/lib/namespace index a02d45402..76e9659ef 100644 --- a/lib/namespace +++ b/lib/namespace @@ -7,7 +7,7 @@ bind #c /dev bind #d /fd bind -c #e /env bind #p /proc -bind -c #s /srv +bind -c #s$srvspec /srv bind -q #σ /shr bind -a #¤ /dev bind -qa #¶ /dev diff --git a/sys/man/3/srv b/sys/man/3/srv index b68f00887..c2185a167 100644 --- a/sys/man/3/srv +++ b/sys/man/3/srv @@ -3,10 +3,10 @@ srv \- server registry .SH SYNOPSIS .nf -.B bind #s /srv +.BI "bind -c #s" $srvspec " /srv" .BI #s/ clone -.BI #s/ n +.BI #s/ id .BI #s/ service1 .BI #s/ service2 ... @@ -23,14 +23,14 @@ to make them available to other processes. .PP To install a channel, create a new file such as -.B /srv/myserv +.BI /srv/ myserv and then write a text string (suitable for .IR strtoul ; see .IR atof (2)) giving the file descriptor number of an open file. Any process may then open -.B /srv/myserv +.BI /srv/ myserv to acquire another reference to the open file that was registered. .PP An entry in @@ -47,13 +47,26 @@ Opening the .I clone file allocates a new service directory. Reading .I clone -returns the id of the new directory. This new service -directory can then be accessed at -.BR /srv/id . -Directories are recursable; each new service directory +returns the +.I id +of the new directory. +This new service directory can then be accessed at +.BI /srv/ id . +Directories are recursive; each new service directory contains its own .I clone -file. +file and sub-directories. +Directories can be walked from the root such as +.BI #s/ id1 / id2 / id3 +which makes them globally addressable. +As a convention, +.B /lib/namespace +accepts the path to the service directory from the +environment variable +.IR $srvspec , +making it possible to start a new namespace +using a specific service directory as a +starting point. .SH EXAMPLE To drop one end of a pipe into .BR /srv ,