DCMD_PROC_* and the /proc filesystem

As described in the QNX Neutrino Programmer's Guide, you can use the DCMD_PROC_* devctl() commands defined in <sys/procfs.h> to control processes. There are 32- and 64-bit versions of some of these commands. For example:

#define DCMD_PROC_STATUS32  (__DIOF(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 7, procfs_status32))
#define DCMD_PROC_STATUS64  (__DIOF(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 7, procfs_status64))
#define DCMD_PROC_STATUS    (__DIOF(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 7, procfs_status))

The first two forms are for specific sizes; the generic form (DCMD_PROC_STATUS) maps onto the 64-bit version, whether you compile for a 32- or 64-bit architecture. If you're compiling for a 32-bit architecture, and you want the generic version to map onto the 32-bit command, define WANT_OLD_DEVCTLS before you include <sys/procfs.h>. If you're compiling for a 64-bit architecture, you always get the 64-bit version of the command.

For more information, see Controlling processes via the /proc filesystem in the Processes chapter of the QNX Neutrino Programmer's Guide.