From acdd130d6bd6e36ab9139da1ca5638233a439044 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 19 Feb 2005 00:06:44 +0000 Subject: [PATCH] filter out system procs from proc_list --- src/os/darwin/darwin_sigar.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/os/darwin/darwin_sigar.c b/src/os/darwin/darwin_sigar.c index ca544f3c..a0ba077b 100644 --- a/src/os/darwin/darwin_sigar.c +++ b/src/os/darwin/darwin_sigar.c @@ -528,11 +528,13 @@ int sigar_proc_list_get(sigar_t *sigar, } num = len/sizeof(*proc); - proclist->number = 0; - proclist->size = num; - proclist->data = malloc(sizeof(*(proclist->data)) * num); + sigar_proc_list_create(proclist); for (i=0; idata[proclist->number++] = proc[i].KI_PID; }