PFAULT(3PROC) Process Control Library Functions PFAULT(3PROC)
- enable and disable the tracing of faults
Process Control Library (libproc, -lproc)
SYNOPSIS #include <libproc.h> int Pfault
(struct ps_prochandle *P
, int which
, int stop
() function controls what the process P
should do on faults.
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
For each hardware fault, a process may be configured to stop the thread
that encountered it when it occurs. The value of the stop
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
Upon successful completion, the Pfault
() 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.
() function will fail if:
EINVAL The value of which
is invalid, e.g. it is less than zero
or greater than the largest defined fault.
ENOENT The handle P
refers to a process that is a zombie, a
core file, or a file.
INTERFACE STABILITY UncommittedMT-LEVEL
SEE ALSO libproc(3LIB)
illumos May 11, 2016 illumos