iOS test ok

pull/5/head
Yu Qing 2016-01-27 18:14:36 +08:00
parent 4421133912
commit 8a77902f34
3 changed files with 4 additions and 2 deletions

View File

@ -491,6 +491,7 @@ int get_processes(struct fast_process_info **processes, int *count)
size_t size;
int bytes;
int nproc;
int i;
bool success;
*count = 0;

View File

@ -47,7 +47,7 @@ extern "C" {
char f_mntonname[MNAMELEN]; /* directory on which mounted */
} FastStatFS;
#ifdef OS_LINUX
#if defined(OS_LINUX) || defined(OS_FREEBSD)
typedef struct fast_process_info {
int field_count; //field count in /proc/$pid/stat
int pid;

View File

@ -90,7 +90,8 @@ int main(int argc, char *argv[])
printf("process count: %d\n", count);
for (i=0; i<count; i++)
{
printf("%d %d %c %s\n", processes[i].field_count, processes[i].pid, processes[i].state, processes[i].comm);
printf("%d %d %d %d %s %lld\n", processes[i].field_count, processes[i].pid,
processes[i].ppid, processes[i].state, processes[i].comm, processes[i].starttime);
}
if (processes != NULL)
{