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