summaryrefslogtreecommitdiff
path: root/tmp/test1.c
blob: bf560609e03ddd8be2e74a44b85d48c42966253e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;
}