/home/fernape/Projects/lkmonitor/src/processes.c File Reference

#include <ctype.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include "others.h"

Go to the source code of this file.

Functions

int get_proc_list (struct dirent ***proclist)
 Get the list of processes.


Function Documentation

int get_proc_list ( struct dirent ***  proclist  ) 

Get the list of processes.

Get the list of processes

Parameters:
proclist Triple pointer to dirent struct. Here we write the list of processes.
Returns:
Number of processes attached or errno if error.

Definition at line 62 of file processes.c.

References numsort().

00062                                             {
00063         int numfich;
00064         
00065         if ((numfich = scandir ("/proc", proclist, &filter, numsort)) == -1)
00066     {
00067       perror ("scandir error");
00068       return (errno);
00069     }
00070         
00071         return(numfich);
00072 }


Generated on Tue Apr 1 22:52:56 2008 for lkmonitor by  doxygen 1.5.1