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