Obtain information about the process associated with the file descriptor.

#include <sys/procfs.h>

#define DCMD_PROC_INFO  __DIOF(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 1, procfs_info)

The arguments to devctl() are:

Argument Value
filedes A file descriptor for the process.
dev_data_ptr A pointer to a procfs_info structure
n_bytes sizeof(procfs_info)
dev_info_ptr NULL

The argument is a pointer to a procfs_info structure (see debug_process_t in <sys/debug.h>) that's filled in with the required information on return. For example:

procfs_info my_info;

devctl( fd, DCMD_PROC_INFO, &my_info, sizeof(my_info), NULL);

For more information, see the section on DCMD_PROC_INFO in the appendix about the /procfs filesystem in The QNX Neutrino Cookbook.