summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJacob Moody <moody@posixcafe.org>2023-03-29 23:56:44 +0000
committerJacob Moody <moody@posixcafe.org>2023-03-29 23:56:44 +0000
commitc8748ffbc3dac53a6d2f031222f262ad22a49b5e (patch)
tree790718227cc06b20accbaba03fb127d002334bf7 /sys
parent997ea3e5ccd9cba5d1f8fad48a0320574696f5bc (diff)
srv(3): provide /srv/clone example
Diffstat (limited to 'sys')
-rw-r--r--sys/man/3/srv21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/man/3/srv b/sys/man/3/srv
index cb1407f8f..a62cc3b9c 100644
--- a/sys/man/3/srv
+++ b/sys/man/3/srv
@@ -97,5 +97,26 @@ read(p[1], buf, sizeof buf);
.EE
.PP
in the above process.
+.PP
+Create a disposable
+.B /srv
+and start a
+.IR factotum (4)
+and a
+.IR rio (1)
+in it.
+.IP
+.EX
+<[3]/srv/clone{
+ id=`{<[0=3]read}
+ <[3=0]@{ #hide clone fd
+ rfork n
+ bind -c /srv/$id /srv
+ auth/factotum -s factotum
+ rio
+ }
+}
+.EE
+.PP
.SH SOURCE
.B /sys/src/9/port/devsrv.c