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