bind -c #₪ /srv /srv/service1 /srv/service2 ...
To access a Plan 9 service in Inferno, open the desired service file; the resulting file descriptor is connected to the associated Plan 9 service. When that service is a shared Plan 9 file service, srv9 automatically starts Plan 9's exportfs with appropriate options to make the service accessible from Inferno. It can safely be shared with Plan 9 applications, but note that any path names mentioned in the attach specifier (see mount(1) and attach(5)) will be in the Plan 9 application's name space, not the Inferno application's. (Indeed, a similar caveat applies in Plan 9 itself.)
To export an Inferno service to Plan 9, create a new file such as /srv/myserv using Sys->create with mode Sys->ORDWR (see sys-open(2)) and any desired permissions for the new service file. (Note that the #₪ device must have been bound in with the -c option, as shown above, to allow file creation.) If the create is successful, Plan 9's service registry will have a new entry myserv, and the file descriptor returned from create acts as a pipe to any Plan 9 application that opens the associated service file in Plan 9. Typically on the Inferno side the file descriptor is passed to sys-export(2) or made the standard input of an Inferno file service (see intro(4)). The Plan 9 service file is automatically removed when the Inferno file descriptor is no longer referenced.
mount -Aa /srv/factotum /mnt
(Note the -A option to suppress Inferno authentication.)
To mount the Plan 9 file service from which a Plan 9 machine booted:
mount -9 /srv/boot /n/local
The -9 option to mount(1) requests Plan 9 authentication; that could also have been used instead of -A in the previous example.
To make the environment variables of the current Inferno name space available to Plan 9:
fd := sys->create("/srv/infenv", Sys->ORDWR, 8r600); sys->export(fd, "/env", Sys->EXPWAIT);
|/man/3/srv9(3)||Rev: Thu Feb 15 14:43:36 GMT 2007|