ref: c8748ffbc3dac53a6d2f031222f262ad22a49b5e
parent: 997ea3e5ccd9cba5d1f8fad48a0320574696f5bc
author: Jacob Moody <moody@posixcafe.org>
date: Wed Mar 29 19:56:44 EDT 2023
srv(3): provide /srv/clone example
--- a/sys/man/3/srv
+++ b/sys/man/3/srv
@@ -97,5 +97,26 @@
.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