1 PCLEARFAULT(3PROC) Process Control Library Functions PCLEARFAULT(3PROC) 2 3 NAME 4 Pclearfault, Lclearfault - clear process and thread faults 5 6 LIBRARY 7 Process Control Library (libproc, -lproc) 8 9 SYNOPSIS 10 #include <libproc.h> 11 12 int 13 Pclearfault(struct ps_prochandle *P); 14 15 int 16 Lclearfault(struct ps_lwphandle *L); 17 18 DESCRIPTION 19 During normal operation a process may encounter a fault, due to a 20 hardware exception, identifying a problem with the running process. 21 Hardware faults include things like executing illegal instructions, 22 encountering a breakpoint, and arithmetic exceptions. Faults are 23 discussed further in proc(4). 24 25 The Pclearfault() function instructs the system to clear any fault 26 pending delivery to a thread in the process represented by the process 27 handle P. The pending fault will never be delivered to process 28 represented by P. 29 30 The Lclearfault() function is identical to the Pclearfault() function, 31 except rather than operating on the representative thread of the process 32 it operates on the thread handle L. 33 34 The Pclearfault() and Lclearfault() functions only have meaning for 35 active processes. They will fail on process handles corresponding to 36 zombie processes, ELF objects, and cores. 37 38 RETURN VALUES 39 Upon successful completion, the Pclearfault() and Lclearfault() functions 40 clear pending faults and return 0. Otherwise, -1 is returned, errno is 41 set to indicate the error, and no faults are cleared. 42 43 ERRORS 44 For a full list of possible errors see the DIAGNOSTICS section in 45 proc(4). 46 47 INTERFACE STABILITY 48 Uncommitted 49 50 MT-LEVEL 51 See LOCKING in libproc(3LIB). 52 53 SEE ALSO 54 libproc(3LIB), proc(4) 55 56 illumos May 11, 2016 illumos