1 .\" 2 .\" This file and its contents are supplied under the terms of the 3 .\" Common Development and Distribution License ("CDDL"), version 1.0. 4 .\" You may only use this file in accordance with the terms of version 5 .\" 1.0 of the CDDL. 6 .\" 7 .\" A full copy of the text of the CDDL should have accompanied this 8 .\" source. A copy of the CDDL is also available via the Internet at 9 .\" http://www.illumos.org/license/CDDL. 10 .\" 11 .\" 12 .\" Copyright 2015 Joyent, Inc. 13 .\" 14 .Dd May 11, 2016 15 .Dt PCLEARFAULT 3PROC 16 .Os 17 .Sh NAME 18 .Nm Pclearfault , 19 .Nm Lclearfault 20 .Nd clear process and thread faults 21 .Sh LIBRARY 22 .Lb libproc 23 .Sh SYNOPSIS 24 .In libproc.h 25 .Ft int 26 .Fo Pclearfault 27 .Fa "struct ps_prochandle *P" 28 .Fc 29 .Ft int 30 .Fo Lclearfault 31 .Fa "struct ps_lwphandle *L" 32 .Fc 33 .Sh DESCRIPTION 34 During normal operation a process may encounter a 35 .Sy fault , 36 due to a hardware exception, identifying a problem with the running process. 37 Hardware faults include things like executing illegal instructions, encountering 38 a breakpoint, and arithmetic exceptions. 39 Faults are discussed further in 40 .Xr proc 4 . 41 .Pp 42 The 43 .Fn Pclearfault 44 function instructs the system to clear any fault pending delivery to a 45 thread in the process represented by the process handle 46 .Fa P . 47 The pending fault will never be delivered to process represented by 48 .Fa P . 49 .Pp 50 The 51 .Fn Lclearfault 52 function is identical to the 53 .Fn Pclearfault 54 function, except rather than operating on the representative thread of 55 the process it operates on the thread handle 56 .Fa L . 57 .Pp 58 The 59 .Fn Pclearfault 60 and 61 .Fn Lclearfault 62 functions only have meaning for active processes. 63 They will fail on process handles corresponding to zombie processes, ELF 64 objects, and cores. 65 .Sh RETURN VALUES 66 Upon successful completion, the 67 .Fn Pclearfault 68 and 69 .Fn Lclearfault 70 functions clear pending faults and return 71 .Sy 0 . 72 Otherwise, 73 .Sy -1 74 is returned, 75 .Sy errno 76 is set to indicate the error, 77 and no faults are cleared. 78 .Sh ERRORS 79 For a full list of possible errors see the 80 .Sy DIAGNOSTICS 81 section in 82 .Xr proc 4 . 83 .Sh INTERFACE STABILITY 84 .Sy Uncommitted 85 .Sh MT-LEVEL 86 See 87 .Sy LOCKING 88 in 89 .Xr libproc 3LIB . 90 .Sh SEE ALSO 91 .Xr libproc 3LIB , 92 .Xr proc 4