diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/acme/util.c | 4 | ||||
-rw-r--r-- | src/cmd/plumb/plumber.c | 7 | ||||
-rw-r--r-- | src/cmd/plumb/rules.c | 1 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/cmd/acme/util.c b/src/cmd/acme/util.c index 180b2bd2..cfbfae3f 100644 --- a/src/cmd/acme/util.c +++ b/src/cmd/acme/util.c @@ -298,7 +298,7 @@ tgetc(void *a, uint n) Rune* skipbl(Rune *r, int n, int *np) { - while(n>0 && *r==' ' || *r=='\t' || *r=='\n'){ + while(n>0 && (*r==' ' || *r=='\t' || *r=='\n')){ --n; r++; } @@ -309,7 +309,7 @@ skipbl(Rune *r, int n, int *np) Rune* findbl(Rune *r, int n, int *np) { - while(n>0 && *r!=' ' && *r!='\t' && *r!='\n'){ + while(n>0 && (*r!=' ' && *r!='\t' && *r!='\n')){ --n; r++; } diff --git a/src/cmd/plumb/plumber.c b/src/cmd/plumb/plumber.c index ae45f933..54c60521 100644 --- a/src/cmd/plumb/plumber.c +++ b/src/cmd/plumb/plumber.c @@ -29,14 +29,18 @@ void threadmain(int argc, char *argv[]) { char buf[512]; - int fd; + int fd, dofork; progname = "plumber"; + dofork = 1; ARGBEGIN{ case 'd': debug = 1; break; + case 'f': + dofork = 0; + break; case 'p': plumbfile = ARGF(); break; @@ -66,6 +70,7 @@ threadmain(int argc, char *argv[]) * Start all processes and threads from other proc * so we (main pid) can return to user. */ + if(dofork) switch(fork()){ case -1: sysfatal("fork: %r"); diff --git a/src/cmd/plumb/rules.c b/src/cmd/plumb/rules.c index 52a3d8e5..689edf59 100644 --- a/src/cmd/plumb/rules.c +++ b/src/cmd/plumb/rules.c @@ -741,6 +741,7 @@ morerules(uchar *text, int done) ; while((rs=readruleset()) != nil){ rules = erealloc(rules, (n+2)*sizeof(Ruleset*)); + fprint(2, "initialize rules %d %d\n", n, n+1); rules[n++] = rs; rules[n] = nil; } |