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.
This commit is contained in:
cinap_lenrek 2020-03-08 22:00:23 +01:00
parent 11628e90fb
commit e9e55a21f6
4 changed files with 79 additions and 132 deletions

View file

@ -246,8 +246,6 @@ void postsharesrv(Srv*, char*, char*, char*);
void _postsharesrv(Srv*, char*, char*, char*);
void listensrv(Srv*, char*);
void _listensrv(Srv*, char*);
int postfd(char*, int);
int sharefd(char*, char*, int);
int chatty9p;
void respond(Req*, char*);
void responderror(Req*);