aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/plumb/plumber.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-02-29 22:42:33 +0000
committerrsc <devnull@localhost>2004-02-29 22:42:33 +0000
commitf063dad96ec737db0ce213c4df32ecc600637881 (patch)
treea8735ff7873de4f7fda886264158e89493875290 /src/cmd/plumb/plumber.c
parent91c13e54b5d631b65e2f8344d5e0abd058f78ba1 (diff)
downloadplan9port-f063dad96ec737db0ce213c4df32ecc600637881.tar.gz
plan9port-f063dad96ec737db0ce213c4df32ecc600637881.tar.bz2
plan9port-f063dad96ec737db0ce213c4df32ecc600637881.zip
Small tweaks to make things build again.
Diffstat (limited to 'src/cmd/plumb/plumber.c')
-rw-r--r--src/cmd/plumb/plumber.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/cmd/plumb/plumber.c b/src/cmd/plumb/plumber.c
index 424469f2..ae45f933 100644
--- a/src/cmd/plumb/plumber.c
+++ b/src/cmd/plumb/plumber.c
@@ -26,23 +26,10 @@ makeports(Ruleset *rules[])
}
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