Commit graph

23 commits

Author SHA1 Message Date
qwx ad26f82e44 man page fixes (thanks stuart morrow) 2021-08-24 21:45:37 +00:00
Sigrid Solveig Haflínudóttir 185fe31de4 9p(2): fix a typo (thanks humm) 2021-08-05 13:01:35 +00:00
Jacob Moody 370ef39bf9 lib9p: add auth* functions to man page 2021-06-12 23:12:41 +00:00
cinap_lenrek ee289c2415 lib9p: remove Srv.srvfd, make postsrv() and threadpostsrv() return the mountable file descriptor, update documentation
Now that we have these new functions,
we can also make them return an error
instead of calling sysfatal() like
postmountsrv().

Remove the confusing Srv.srvfd, as it
is only temporarily used and return
it from postsrv() instead.
2021-05-01 19:58:58 +02:00
cinap_lenrek f6509078ed lib9p: expose Srv.forker handler and srvforker(), threadsrvforker() and threadsrv() functions
To use srvrease()/srvaquire() we need to have a way to spawn
new processes to handle the service loop. This functionality
was provided by the internal _forker() function which was
eigther rfork or libthread based implementation depending on
if postmountsrv() or threadpostmountsrv() where called.

For servers who want to use srv() directly, _forker would not
be initialized so srvrelease() could not be used.

To untangle this, we get rid of the global _forker handler
and put the handler in the Srv structure. Which will get
initialized (when nil) to eigther srvforker() or threadsrvforker()
depending on if the thread or non-thread entry points where used.

For symmetry, we provde new threadsrv() and threadpostsrv()
functions which handle the default initialization of Srv.forker.

This also allows a user to provide his own forker function,
maybe to conserve stack space.

To avoid dead code, we put each of these function in their
own object file. Note, this also allows a user to define its
own srvforker() symbol.
2021-05-01 16:37:00 +02:00
kvik f0ea4af5ef 9p(2): fix typo 2020-06-25 23:23:23 +02:00
cinap_lenrek e9e55a21f6 lib9p: implement automatic remove-on-close cleanup in postsharesrv(), remove postfd() and sharefd() functions
with the latest changes to shr(3), we can use ORCLOSE on
the control file to get the mount in the share automatically
removed when the server exits or something goes wrong during
postsharesrv().

do not expose postfd() and sharefd() functions. they where
undocumented and leak the control file descriptors.
2020-03-08 22:00:23 +01:00
cinap_lenrek 06b9aa5039 9p(2): document all the effective rfork flags for postmountsrv() 2020-03-08 15:29:32 +01:00
cinap_lenrek bc1212faf2 9p(2): document the filedescriptor sharing behaviour of postmountsrv() 2020-03-08 14:49:34 +01:00
cinap_lenrek 225c359bea lib9p: get rid of Srv.nopipe and Srv.leavefdsopen hacks
it is unclear how Srv.nopipe flag should work inside
postmountserv(). if a server wants to serve on stdio
descriptors, he can just call srv() after initializing
Srv.infd and Srv.outfd.

The Srv.leavefdsopen hack can be removed now that acme
win has been fixed.
2020-03-07 20:19:14 +01:00
cinap_lenrek 95c166fc35 9p(2): fix sentence for wstat function (thanks jsmoody) 2019-12-21 15:31:10 +01:00
BurnZeZ 424424fe50 fix bad function declarations in manpages 2019-04-09 18:34:17 +00:00
stanley lieber e35616cb66 /sys/man/*/*: fix perms (sorry) 2017-12-11 19:58:06 -05:00
stanley lieber d057d67bed /sys/lib/rootstub 2017-12-11 19:34:15 -05:00
aiju 1d891d163e fix typo in 9p(2) manpage 2017-04-03 00:11:40 +00:00
cinap_lenrek 26c39ddc8d 9p(2): remove reference to ssh(1) 2017-01-13 19:18:08 +01:00
cinap_lenrek 2dc3180f98 9p(2): add reference to 9pqueue(2) 2014-07-03 00:57:40 +02:00
cinap_lenrek e30f50283c 9p(2): correct usage for srvrelease()/srvacquire()
the process is *NOT* allowed to exit after a srvrelease() as
it still holds a reference (srv->rref) preventing the srv
from beging freed/ended (listensrv) before srvacquire().
2013-10-17 08:26:05 +02:00
cinap_lenrek 9c844d90e1 lib9p: add Srv.start 2012-03-30 20:06:33 +02:00
cinap_lenrek 4be523b7e1 9p(2): add reference 2011-08-26 06:27:00 +02:00
cinap_lenrek 49c122665f 9p(2): document postsharesrv and srvrelease/srvacquire 2011-08-26 06:24:42 +02:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen b41b903422 Import sources from 2011-03-30 iso image - sys/man 2011-03-30 16:49:47 +03:00