Small tweaks to make things build again.

This commit is contained in:
rsc 2004-02-29 22:42:33 +00:00
parent 91c13e54b5
commit f063dad96e
18 changed files with 43 additions and 48 deletions

View file

@ -25,24 +25,11 @@ makeports(Ruleset *rules[])
addport(rules[i]->port);
}
void
mainproc(void *v)
{
Channel *c;
c = v;
printerrors = 0;
makeports(rules);
startfsys();
sendp(c, nil);
}
void
threadmain(int argc, char *argv[])
{
char buf[512];
int fd;
Channel *c;
progname = "plumber";
@ -79,11 +66,18 @@ threadmain(int argc, char *argv[])
* Start all processes and threads from other proc
* so we (main pid) can return to user.
*/
c = chancreate(sizeof(void*), 0);
proccreate(mainproc, c, 8192);
recvp(c);
chanfree(c);
threadexits(nil);
switch(fork()){
case -1:
sysfatal("fork: %r");
case 0:
break;
default:
_exit(0);
}
printerrors = 0;
makeports(rules);
startfsys();
}
void