glenda.party
term% ls -F
term% pwd
$home/manuals/9front/3/shr
term% cat index.txt
SHR(3)                     Library Functions Manual                     SHR(3)



NAME
       shr - global mountpoints

SYNOPSIS
       bind '#Ï' /shr

       #Ï/share1
       #Ïc/share1/service1
       #Ïc/share1/service2
        ...

DESCRIPTION
       The  shr device provides global mountpoints in the form of share direc‐
       tories where 9P services can be mounted.

       Effectively, it is a global mountpoint registry that is  separate  from
       private namespaces.

       The  shr  device exports a mount tree and a control tree.  The directo‐
       ries in the mount tree #Ï are the share mountpoints  themselves,  while
       the directories in #Ïc contain the service files of the share.

       To create a new share, create the directory #Ïc/myshare

       To  mount  a  service in that share, create the file #Ïc/myshare/myserv
       and then write a text string (suitable for strtoul; see atof(2)) giving
       the file descriptor number of an open 9P service.  Any process with the
       proper permission may then access #Ï/myshare on the mount tree.

       The service file can be reopened and passed to mount (see  bind(2))  or
       added to another share.

       Multiple  services  can be mounted under a share forming a union direc‐
       tory. New services get mounted before old ones.  Removing  the  service
       file unmounts the service from the share.

       Creating  shares and mounts requires read-write access in the share di‐
       rectory. The special user none is prohibited from these operations.

SOURCE
       /sys/src/9/port/devshr.c

HISTORY
       Shr first appeared in 9front (July, 2011).



                                                                        SHR(3)