Get information about the path for the process associated with the file descriptor.
#include <sys/procfs.h> #define DCMD_PROC_MAPDEBUG_BASE __DIOF(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 3, procfs_debuginfo)
The arguments to devctl() are:
Argument | Value |
---|---|
filedes | A file descriptor for the process. |
dcmd | DCMD_PROC_MAPDEBUG_BASE |
dev_data_ptr | A pointer to a procfs_debuginfo structure |
n_bytes | sizeof(procfs_debuginfo) plus the size of the buffer for the path |
dev_info_ptr | NULL |
The argument is a pointer to a procfs_debuginfo structure, followed by a buffer for the path name, which is filled in with the required information on return. For example:
static struct { procfs_debuginfo info; char buff [PATH_MAX]; } name;
For an example of using DCMD_PROC_MAPDEBUG_BASE, see Iterating through the list of processes in the appendix about the /procfs filesystem in The QNX Neutrino Cookbook.