iOS test ok
parent
4421133912
commit
8a77902f34
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue