143051d27SRobert Mustacchi.\" 243051d27SRobert Mustacchi.\" This file and its contents are supplied under the terms of the 343051d27SRobert Mustacchi.\" Common Development and Distribution License ("CDDL"), version 1.0. 443051d27SRobert Mustacchi.\" You may only use this file in accordance with the terms of version 543051d27SRobert Mustacchi.\" 1.0 of the CDDL. 643051d27SRobert Mustacchi.\" 743051d27SRobert Mustacchi.\" A full copy of the text of the CDDL should have accompanied this 843051d27SRobert Mustacchi.\" source. A copy of the CDDL is also available via the Internet at 943051d27SRobert Mustacchi.\" http://www.illumos.org/license/CDDL. 1043051d27SRobert Mustacchi.\" 1143051d27SRobert Mustacchi.\" 1243051d27SRobert Mustacchi.\" Copyright 2015 Joyent, Inc. 1343051d27SRobert Mustacchi.\" 1443051d27SRobert Mustacchi.Dd May 11, 2016 1543051d27SRobert Mustacchi.Dt PCLEARFAULT 3PROC 1643051d27SRobert Mustacchi.Os 1743051d27SRobert Mustacchi.Sh NAME 1843051d27SRobert Mustacchi.Nm Pclearfault , 1943051d27SRobert Mustacchi.Nm Lclearfault 2043051d27SRobert Mustacchi.Nd clear process and thread faults 21ab618543SJohn Levon.Sh LIBRARY 2243051d27SRobert Mustacchi.Lb libproc 23ab618543SJohn Levon.Sh SYNOPSIS 2443051d27SRobert Mustacchi.In libproc.h 2543051d27SRobert Mustacchi.Ft int 2643051d27SRobert Mustacchi.Fo Pclearfault 2743051d27SRobert Mustacchi.Fa "struct ps_prochandle *P" 2843051d27SRobert Mustacchi.Fc 2943051d27SRobert Mustacchi.Ft int 3043051d27SRobert Mustacchi.Fo Lclearfault 3143051d27SRobert Mustacchi.Fa "struct ps_lwphandle *L" 3243051d27SRobert Mustacchi.Fc 3343051d27SRobert Mustacchi.Sh DESCRIPTION 3443051d27SRobert MustacchiDuring normal operation a process may encounter a 3543051d27SRobert Mustacchi.Sy fault , 3672d3dbb9SYuri Pankovdue to a hardware exception, identifying a problem with the running process. 3772d3dbb9SYuri PankovHardware faults include things like executing illegal instructions, encountering 3872d3dbb9SYuri Pankova breakpoint, and arithmetic exceptions. 3943051d27SRobert MustacchiFaults are discussed further in 40*bbf21555SRichard Lowe.Xr proc 5 . 4143051d27SRobert Mustacchi.Pp 4243051d27SRobert MustacchiThe 4343051d27SRobert Mustacchi.Fn Pclearfault 4443051d27SRobert Mustacchifunction instructs the system to clear any fault pending delivery to a 4543051d27SRobert Mustacchithread in the process represented by the process handle 4643051d27SRobert Mustacchi.Fa P . 4743051d27SRobert MustacchiThe pending fault will never be delivered to process represented by 4843051d27SRobert Mustacchi.Fa P . 4943051d27SRobert Mustacchi.Pp 5043051d27SRobert MustacchiThe 5143051d27SRobert Mustacchi.Fn Lclearfault 5243051d27SRobert Mustacchifunction is identical to the 5343051d27SRobert Mustacchi.Fn Pclearfault 5443051d27SRobert Mustacchifunction, except rather than operating on the representative thread of 5543051d27SRobert Mustacchithe process it operates on the thread handle 5643051d27SRobert Mustacchi.Fa L . 5743051d27SRobert Mustacchi.Pp 5843051d27SRobert MustacchiThe 5943051d27SRobert Mustacchi.Fn Pclearfault 6043051d27SRobert Mustacchiand 6143051d27SRobert Mustacchi.Fn Lclearfault 6272d3dbb9SYuri Pankovfunctions only have meaning for active processes. 6372d3dbb9SYuri PankovThey will fail on process handles corresponding to zombie processes, ELF 6472d3dbb9SYuri Pankovobjects, and cores. 6543051d27SRobert Mustacchi.Sh RETURN VALUES 6643051d27SRobert MustacchiUpon successful completion, the 6743051d27SRobert Mustacchi.Fn Pclearfault 6843051d27SRobert Mustacchiand 6943051d27SRobert Mustacchi.Fn Lclearfault 7043051d27SRobert Mustacchifunctions clear pending faults and return 7143051d27SRobert Mustacchi.Sy 0 . 7243051d27SRobert MustacchiOtherwise, 7343051d27SRobert Mustacchi.Sy -1 7443051d27SRobert Mustacchiis returned, 7543051d27SRobert Mustacchi.Sy errno 7643051d27SRobert Mustacchiis set to indicate the error, 7743051d27SRobert Mustacchiand no faults are cleared. 7843051d27SRobert Mustacchi.Sh ERRORS 7943051d27SRobert MustacchiFor a full list of possible errors see the 8043051d27SRobert Mustacchi.Sy DIAGNOSTICS 8143051d27SRobert Mustacchisection in 82*bbf21555SRichard Lowe.Xr proc 5 . 8343051d27SRobert Mustacchi.Sh INTERFACE STABILITY 8443051d27SRobert Mustacchi.Sy Uncommitted 8543051d27SRobert Mustacchi.Sh MT-LEVEL 8643051d27SRobert MustacchiSee 8743051d27SRobert Mustacchi.Sy LOCKING 8843051d27SRobert Mustacchiin 8943051d27SRobert Mustacchi.Xr libproc 3LIB . 9043051d27SRobert Mustacchi.Sh SEE ALSO 9143051d27SRobert Mustacchi.Xr libproc 3LIB , 92*bbf21555SRichard Lowe.Xr proc 5 93