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 SYNOPSIS 22 .Lb libproc 23 .In libproc.h 24 .Ft int 25 .Fo Pclearfault 26 .Fa "struct ps_prochandle *P" 27 .Fc 28 .Ft int 29 .Fo Lclearfault 30 .Fa "struct ps_lwphandle *L" 31 .Fc 32 .Sh DESCRIPTION 33 During normal operation a process may encounter a 34 .Sy fault , 35 due to a hardware exception, identifying a problem with the running process. 36 Hardware faults include things like executing illegal instructions, encountering 37 a breakpoint, and arithmetic exceptions. 38 Faults are discussed further in 39 .Xr proc 4 . 40 .Pp 41 The 42 .Fn Pclearfault 43 function instructs the system to clear any fault pending delivery to a 44 thread in the process represented by the process handle 45 .Fa P . 46 The pending fault will never be delivered to process represented by 47 .Fa P . 48 .Pp 49 The 50 .Fn Lclearfault 51 function is identical to the 52 .Fn Pclearfault 53 function, except rather than operating on the representative thread of 54 the process it operates on the thread handle 55 .Fa L . 56 .Pp 57 The 58 .Fn Pclearfault 59 and 60 .Fn Lclearfault 61 functions only have meaning for active processes. 62 They will fail on process handles corresponding to zombie processes, ELF 63 objects, and cores. 64 .Sh RETURN VALUES 65 Upon successful completion, the 66 .Fn Pclearfault 67 and 68 .Fn Lclearfault 69 functions clear pending faults and return 70 .Sy 0 . 71 Otherwise, 72 .Sy -1 73 is returned, 74 .Sy errno 75 is set to indicate the error, 76 and no faults are cleared. 77 .Sh ERRORS 78 For a full list of possible errors see the 79 .Sy DIAGNOSTICS 80 section in 81 .Xr proc 4 . 82 .Sh INTERFACE STABILITY 83 .Sy Uncommitted 84 .Sh MT-LEVEL 85 See 86 .Sy LOCKING 87 in 88 .Xr libproc 3LIB . 89 .Sh SEE ALSO 90 .Xr libproc 3LIB , 91 .Xr proc 4