Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/Pfault.3proc.man.txt
+++ new/usr/src/man/man3proc/Pfault.3proc.man.txt
1 1 PFAULT(3PROC) Process Control Library Functions PFAULT(3PROC)
2 2
3 3 NAME
4 4 Pfault - enable and disable the tracing of faults
5 5
6 -SYNOPSIS
6 +LIBRARY
7 7 Process Control Library (libproc, -lproc)
8 +
9 +SYNOPSIS
8 10 #include <libproc.h>
9 11
10 12 int
11 13 Pfault(struct ps_prochandle *P, int which, int stop);
12 14
13 15 DESCRIPTION
14 16 The Pfault() function controls what the process P should do on faults.
15 17
16 18 A fault is a hardware event that occurs in the context of a running
17 19 process and thread. A hardware fault may occur because an illegal
18 20 instruction was executed, a breakpoint or watchpoint was encountered, or
19 21 an arithmetic exception occurred, among others. The full list of faults
20 22 is available in both proc(4) and <sys/fault.h>.
21 23
22 24 For each hardware fault, a process may be configured to stop the thread
23 25 that encountered it when it occurs. The value of the stop parameter
24 26 controls whether or not the listed fault in which will cause the thread
25 27 to trap. A value of 1 indicates the thread should stop; a value of 0
26 28 indicates it should not.
27 29
28 30 The value of which indicates which hardware fault the change applies to.
29 31 However, if the value of which is zero, then it applies to all faults.
30 32
31 33 The Pfault() function only applies to actively running processes. It
32 34 does not function on handles that refer to core files, zombie processes,
33 35 or ELF objects.
34 36
35 37 RETURN VALUES
36 38 Upon successful completion, the Pfault() function returns the old
37 39 disposition of the fault -- 0 if it was not set to stop and 1 if it was
38 40 -- and the fault state is updated. Otherwise, -1 is returned, errno is
39 41 updated with the error that occurred, and the fault state is not updated.
40 42
41 43 ERRORS
42 44 The Pfault() function will fail if:
43 45
44 46 EINVAL The value of which is invalid, e.g. it is less than
45 47 zero or greater than the largest defined fault.
46 48
47 49 ENOENT The handle P refers to a process that is a zombie, a
48 50 core file, or a file.
49 51
50 52 INTERFACE STABILITY
51 53 Uncommitted
52 54
53 55 MT-LEVEL
54 56 See LOCKING in libproc(3LIB).
55 57
56 58 SEE ALSO
57 59 libproc(3LIB), proc(4)
58 60
59 61 illumos May 11, 2016 illumos
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX