А вот скажите программеры

Author: Cetus [322 views] 2013-07-12 11:24:19

есть вот такая функция, которая вроде как делает чего мне надо

PSTAT FUNCTION
Name
pstat_getfile2() - get information for an open file of a process

Synopsis
#include <sys/pstat.h>

int pstat_getfile2(
struct pst_fileinfo2 *buf,
size_t elemsize,
size_t elemcount,
int index,
pid_t pid
);

Description
pstat_getfile2() returns information specific to a particular open
file for a specified process. For the specified process, there is one
instance of this context for each open file descriptor. For each
instance requested, up to a maximum of elemsize bytes of data is
returned in the pst_fileinfo2 structures pointed to by buf. The
elemcount parameter specifies the number of pst_fileinfo2 structures
that are available at buf to be filled in. The index parameter
specifies the starting index within the context of open files for the
specified process: It is the file descriptor number with which to
begin. The pid parameter specifies the process ID.

Ну и так далее. Этот код как то можно подправить и компильнуть чтобы типа можно было запускать потом с требуемыми параметрами и получать рЭзультат?

Reply | Reply to sender (private) | Synchronize
 * А вот скажите программеры Cetus [321 views] 1290 bytes
 *Re: А вот скажите программеры Vovka [259 views] 40 bytes
 *не влетит elenas [272 views] 3 bytes
 *Re: брысь! Cetus [245 views] 0 bytes
 *да можно Штирлиц [245 views] 0 bytes
 *Re: Незачет Cetus [246 views] 33 bytes
 *Хотелось бы понять вопрос Штирлиц [223 views] 0 bytes