summaryrefslogtreecommitdiff
path: root/tmp/test1.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmp/test1.c')
-rw-r--r--tmp/test1.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/tmp/test1.c b/tmp/test1.c
new file mode 100644
index 00000000..bf560609
--- /dev/null
+++ b/tmp/test1.c
@@ -0,0 +1,26 @@
+#include <stdio.h>
+
+#include <hurd.h>
+#include <mach.h>
+
+int main()
+{
+ pid_t *pp;
+ size_t npids = 0;
+ error_t err;
+ int i;
+
+ err = proc_getallpids (getproc (), &pp, &npids);
+ if (err)
+ error (1, err, "get all pids");
+
+ for (i = 0; i < npids; i++)
+ {
+ task_t task = pid2task (pp[i]);
+ printf ("get task: %d\n", task);
+// err = task_terminate (task);
+// if (err)
+// error (2, err, "terminate task: %d", task);
+ }
+ return 0;
+}