use threaddaemonize

This commit is contained in:
rsc 2004-12-28 01:37:18 +00:00
parent 96d6b19dcd
commit 7ffc5208a8
2 changed files with 9 additions and 26 deletions

View file

@ -69,19 +69,8 @@ threadmain(int argc, char *argv[])
rules = readrules(plumbfile, fd);
close(fd);
/*
* 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");
case 0:
break;
default:
_exit(0);
}
threaddaemonize();
printerrors = 0;
makeports(rules);