Define an event to be delivered when the process associated with the file descriptor reaches a point of interest.
Use the DCMD_PROC_RUN command to set up the point of interest.
Unlike DCMD_PROC_WAITSTOP , 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. 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; devctl( fd, DCMD_PROC_EVENT, &event, sizeof(event), NULL);