DCMD_PROC_EVENT

QNX SDP8.0Programmer's GuideDeveloper

Define an event to be delivered when the process associated with the file descriptor reaches a point of interest.

#include <sys/procfs.h>

#define DCMD_PROC_EVENT    (__DIOT(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 17, struct sigevent))

The arguments to devctl() are:

Argument Value
filedes A file descriptor for the process.
dcmd DCMD_PROC_EVENT
dev_data_ptr A pointer to a struct sigevent
n_bytes sizeof(struct sigevent)
dev_info_ptr NULL

Use the DCMD_PROC_RUN command to set up the point of interest.

Note:
The DCMD_PROC_EVENT command won't work unless you've set _DEBUG_RUN_ARM in the flags field of the procfs_run structure for the DCMD_PROC_RUN command. The event command also won't work after the corresponding file descriptor has been closed.

The DCMD_PROC_EVENT command doesn't block the calling process.

The argument is a pointer to the sigevent that you want to be delivered at the appropriate time. The application must register the event by calling MsgRegisterEvent() with SYSMGR_COID passed as the connection ID (coid) or with the file descriptor obtained from opening the process control path. For example:

struct sigevent     event;

// Define a sigevent for process stopped notification.
event.sigev_notify = SIGEV_SIGNAL_THREAD;
event.sigev_signo = SIGUSR2;
event.sigev_code = 0;
event.sigev_value.sival_ptr = prp;
event.sigev_priority = -1;
MsgRegisterEvent( &event, SYSMGR_COID );
devctl( fd, DCMD_PROC_EVENT, &event, sizeof(event), NULL );
Page updated: