diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/plumb/fsys.c | 7 | ||||
-rw-r--r-- | src/cmd/plumb/plumber.c | 6 | ||||
-rw-r--r-- | src/cmd/plumb/plumber.h | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/cmd/plumb/fsys.c b/src/cmd/plumb/fsys.c index 51542674..63106fcd 100644 --- a/src/cmd/plumb/fsys.c +++ b/src/cmd/plumb/fsys.c @@ -186,7 +186,7 @@ getclock(void) } void -startfsys(void) +startfsys(int foreground) { int p[2]; @@ -199,7 +199,10 @@ startfsys(void) if(post9pservice(p[1], "plumb", nil) < 0) sysfatal("post9pservice plumb: %r"); close(p[1]); - proccreate(fsysproc, nil, Stack); + if(foreground) + fsysproc(nil); + else + proccreate(fsysproc, nil, Stack); } static void diff --git a/src/cmd/plumb/plumber.c b/src/cmd/plumb/plumber.c index 2debf49b..c99282f0 100644 --- a/src/cmd/plumb/plumber.c +++ b/src/cmd/plumb/plumber.c @@ -7,6 +7,7 @@ #include "plumber.h" int debug; +int foreground=0; char *plumbfile; char *user; char *home; @@ -37,6 +38,9 @@ threadmain(int argc, char *argv[]) case 'd': debug = 1; break; + case 'f': + foreground = 1; + break; case 'p': plumbfile = ARGF(); break; @@ -69,7 +73,7 @@ threadmain(int argc, char *argv[]) */ printerrors = 0; makeports(rules); - startfsys(); + startfsys(foreground); threadexits(nil); } diff --git a/src/cmd/plumb/plumber.h b/src/cmd/plumb/plumber.h index c8f30816..44700559 100644 --- a/src/cmd/plumb/plumber.h +++ b/src/cmd/plumb/plumber.h @@ -72,7 +72,7 @@ void* emalloc(long); void* erealloc(void*, long); char* estrdup(char*); Ruleset** readrules(char*, int); -void startfsys(void); +void startfsys(int); Exec* matchruleset(Plumbmsg*, Ruleset*); void freeexec(Exec*); char* startup(Ruleset*, Exec*); |