Skip to content

Commit

Permalink
lib9p: add Srv.foreground flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rsc committed Jul 4, 2008
1 parent 0529411 commit 56dc04c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/9p.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion src/lib9p/tpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 56dc04c

Please sign in to comment.