lkmi_readprocesses
#include <lkmi.h >
pid_t *lkmi_readprocesses (int *pN);
lkmi_readprocesses reads from /proc directory pids of currently allocated processes.
If function fails then is returned NULL pointer. In this case is value referred by parameter pN invalid and errno value is appropriately set.
Sometimes this function can detect not enough memory during its executing. In this case is errno set to ENOMEM and array is returned unsorted.
If function end successfully then errno is set to zero and array of pids is sorted.
If function ends successfully then is returned sorted array of pids and value referred by parameter pN contains size of array (Number of pids).
Note: If valid pointer is returned, then it must be freed by free (3) function.
Please use the SourceForge Reporting page which is located here:
This function is written as part of lkmi library for Linux system and may be freely distributed under GPL terms.
Copyright (c) 1995, 2002 David Doubrava (linux_monitor(at)volny(dot)cz).
Origin of values description is in Linux kernel source.
lkmi, lkmi_cpu, lkmi_files, lkmi_filesys, lkmi_hdd, lkmi_hw_intr, lkmi_inodes, lkmi_memory, lkmi_memoryswap, lkmi_net, lkmi_proc, lkmi_readprocesses.html, lkmi_swap, lkmi_swapex, lkmi_system