|PFAULT(3PROC)||Process Control Library Functions||PFAULT(3PROC)|
Pfault — enable
and disable the tracing of faults
Process Control Library (libproc, -lproc)
Pfault(struct ps_prochandle *P,
int which, int stop);
function controls what the process P should do on
A fault is a hardware event that occurs in the context of a
running process and thread. A hardware fault may occur because an illegal
instruction was executed, a breakpoint or watchpoint was encountered, or an
arithmetic exception occurred, among others. The full list of faults is
available in both proc(5) and
For each hardware fault, a process may be configured to stop the thread that encountered it when it occurs. The value of the stop parameter controls whether or not the listed fault in which will cause the thread to trap. A value of 1 indicates the thread should stop; a value of 0 indicates it should not.
The value of which indicates which hardware fault the change applies to. However, if the value of which is zero, then it applies to all faults.
function only applies to actively running processes. It does not function on
handles that refer to core files, zombie processes, or ELF objects.
Upon successful completion, the
function returns the old disposition of the fault --
0 if it was not
set to stop and 1 if it was -- and the fault state is
updated. Otherwise, -1 is returned,
errno is updated with the error that occurred, and
the fault state is not updated.
Pfault() function will fail if:
|May 11, 2016||OmniOS|