try to implement the daemonize hack.

This commit is contained in:
rsc 2004-10-22 18:45:08 +00:00
parent 048610b7ea
commit 5093c3fa40
11 changed files with 165 additions and 51 deletions

View file

@ -22,15 +22,20 @@ threadmain(int argc, char **argv)
{
Channel *c;
Waitmsg *w;
int (*mk)(void(*)(void*), void*, uint);
mk = threadcreate;
ARGBEGIN{
case 'D':
_threaddebuglevel = ~0;
break;
case 'p':
mk = proccreate;
break;
}ARGEND
c = threadwaitchan();
proccreate(doexec, argv, 8192);
mk(doexec, argv, 8192);
w = recvp(c);
if(w == nil)
print("exec/recvp failed: %r\n");