summaryrefslogtreecommitdiffstats
path: root/src/libthread/tspawn.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-25 21:56:33 +0000
committerrsc <devnull@localhost>2004-12-25 21:56:33 +0000
commit1544f90960275dc9211bde30329c3258e0e1bf38 (patch)
treef55e7a73c03aaa24daa7cc2ad02822b921c477f9 /src/libthread/tspawn.c
parent7788fd54094693384ef5c92c475656dba8819feb (diff)
downloadplan9port-1544f90960275dc9211bde30329c3258e0e1bf38.tar.gz
plan9port-1544f90960275dc9211bde30329c3258e0e1bf38.zip
New thread library
Diffstat (limited to 'src/libthread/tspawn.c')
-rw-r--r--src/libthread/tspawn.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/libthread/tspawn.c b/src/libthread/tspawn.c
deleted file mode 100644
index 97962c5d..00000000
--- a/src/libthread/tspawn.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <lib9.h>
-#include <thread.h>
-extern int _threaddebuglevel;
-
-void
-doexec(void *v)
-{
- int fd[3];
- char **argv = v;
-
- print("exec failed: %r\n");
- sendp(threadwaitchan(), nil);
- threadexits(nil);
-}
-
-void
-threadmain(int argc, char **argv)
-{
- int fd[3];
- Channel *c;
- Waitmsg *w;
-
- ARGBEGIN{
- case 'D':
- _threaddebuglevel = ~0;
- break;
- }ARGEND
-
- c = threadwaitchan();
- fd[0] = dup(0, -1);
- fd[1] = dup(1, -1);
- fd[2] = dup(2, -1);
- if(threadspawn(fd, argv[0], argv) < 0)
- sysfatal("threadspawn: %r");
- w = recvp(c);
- if(w == nil)
- print("exec/recvp failed: %r\n");
- else
- print("%d %lud %lud %lud %s\n", w->pid, w->time[0], w->time[1], w->time[2], w->msg);
- threadexits(nil);
-}