Pclearfault
,
Lclearfault
—
clear process and thread faults
Process Control Library (libproc, -lproc)
#include
<libproc.h>
int
Pclearfault
(
struct
ps_prochandle *P);
int
Lclearfault
(
struct
ps_lwphandle *L);
During normal operation a process may encounter a
fault, due to a hardware exception, identifying a
problem with the running process. Hardware faults include things like
executing illegal instructions, encountering a breakpoint, and arithmetic
exceptions. Faults are discussed further in
proc(4).
The
Pclearfault
() function instructs the
system to clear any fault pending delivery to a thread in the process
represented by the process handle
P. The
pending fault will never be delivered to process represented by
P.
The
Lclearfault
() function is identical to
the
Pclearfault
() function, except rather
than operating on the representative thread of the process it operates on the
thread handle
L.
The
Pclearfault
() and
Lclearfault
() functions only have meaning
for active processes. They will fail on process handles corresponding to
zombie processes, ELF objects, and cores.
Upon successful completion, the
Pclearfault
()
and
Lclearfault
() functions clear pending
faults and return
0. Otherwise,
-1 is returned,
errno is set to indicate the error, and no faults
are cleared.
For a full list of possible errors see the
DIAGNOSTICS section in
proc(4).
Uncommitted
See
LOCKING in
libproc(3LIB).
libproc(3LIB),
proc(4)