9 _post1(Srv *s, char *name, char *mtpt, int flag)
13 p = emalloc9p(sizeof *p);
17 s->infd = s->outfd = p->fd[1];
21 if(postfd(name, s->srvfd) < 0)
22 sysfatal("postfd %s: %r", name);
37 rendezvous((ulong)s, 0);
47 * Normally the server is posting as the last thing it does
48 * before exiting, so the correct thing to do is drop into
49 * a different fd space and close the 9P server half of the
50 * pipe before trying to mount the kernel half. This way,
51 * if the file server dies, we don't have a ref to the 9P server
52 * half of the pipe. Then killing the other procs will drop
53 * all the refs on the 9P server half, and the mount will fail.
54 * Otherwise the mount hangs forever.
56 * Libthread in general and acme win in particular make
57 * it hard to make this fd bookkeeping work out properly,
58 * so leaveinfdopen is a flag that win sets to opt out of this
61 if(!p->s->leavefdsopen){
63 rendezvous((ulong)p->s, 0);
65 if(p->s->infd != p->s->outfd)
71 if(amount(p->s->srvfd, p->mtpt, p->flag, "") == -1)
72 sysfatal("mount %s: %r", p->mtpt);