SRV(3)                                                     SRV(3)

     NAME
          srv - server registry

     SYNOPSIS
          bind '#s' /chan

          sys->bind("#s", "/chan", Sys->MREPL);

     DESCRIPTION
          Srv converts between file system operations by applications
          and messages on channels, as described in sys-file2chan(2).
          Each attach produces a new instance: an empty directory
          owned by the current user in which only files may be cre-
          ated, and then only by sys-file2chan, using a special inter-
          nal interface.  Each such file initially has the same owner
          as the directory, and permissions 8r600 (read-write for the
          owner only), but the permissions can be changed by sys-wstat
          (see sys-stat(2)) and thus chmod(1).

          Files may be removed, directly using sys-remove(2) (and thus
          rm(1)), and indirectly by opening them with mode
          Sys->ORCLOSE (see sys-open(2)). File2chan also removes the
          corresponding file when the last references to the server's
          read and write channels have gone (eg, on server exit).

     FILES
          /chan  directory to which srv is bound by wm(1) and used by
                 its applications

     SOURCE
          /emu/devsrv.c
          /os/port/devsrv.c

     SEE ALSO
          plumb(1), wm(1), sys-file2chan(2)

     BUGS
          A client with a read or write pending can remain blocked if
          the server exits before reply.

     Page 1                       Plan 9            (printed 11/17/24)