diff options
| author | rsc <devnull@localhost> | 2004-10-22 18:45:08 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-10-22 18:45:08 +0000 |
| commit | 5093c3fa40717e78b0a63955640a8ac9071b5c07 (patch) | |
| tree | 10141d54500447e4e4fee9aa0b6f9c8d0bcc7352 /src/libthread/texec.c | |
| parent | 048610b7ea50507c6987d5b0cc0c4810cda87d53 (diff) | |
| download | plan9port-5093c3fa40717e78b0a63955640a8ac9071b5c07.tar.gz plan9port-5093c3fa40717e78b0a63955640a8ac9071b5c07.zip | |
try to implement the daemonize hack.
Diffstat (limited to 'src/libthread/texec.c')
| -rw-r--r-- | src/libthread/texec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libthread/texec.c b/src/libthread/texec.c index bcfabee6..c9682e35 100644 --- a/src/libthread/texec.c +++ b/src/libthread/texec.c @@ -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"); |
