commit 56dc04c55fa6b1e54b7fb5e8743e79cd6f3e2dbf
parent 0529411caa88bb5fbdd65d460c0b4042742e23de
Author: Russ Cox <rsc@swtch.com>
Date: Fri, 4 Jul 2008 12:24:14 -0400
lib9p: add Srv.foreground flag
Diffstat:
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/9p.h b/include/9p.h
@@ -205,6 +205,7 @@ struct Srv {
int srvfd;
int leavefdsopen; /* magic for acme win */
int dotu;
+ int foreground; /* run in foreground */
/* below is implementation-specific; don't use */
Fidpool* fpool;
diff --git a/src/lib9p/tpost.c b/src/lib9p/tpost.c
@@ -26,5 +26,8 @@ threadpostmountsrv(Srv *s, char *name, char *mtpt, int flag)
sysfatal("post9pservice %s: %r", name);
}else if(!s->nopipe)
sysfatal("no one to serve");
- proccreate(launchsrv, s, 32*1024);
+ if(s->foreground)
+ srv(s);
+ else
+ proccreate(launchsrv, s, 32*1024);
}