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/Psetflags.3proc
+++ new/usr/src/man/man3proc/Psetflags.3proc
1 1 .\"
2 2 .\" This file and its contents are supplied under the terms of the
3 3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 4 .\" You may only use this file in accordance with the terms of version
5 5 .\" 1.0 of the CDDL.
6 6 .\"
7 7 .\" A full copy of the text of the CDDL should have accompanied this
8 8 .\" source. A copy of the CDDL is also available via the Internet at
9 9 .\" http://www.illumos.org/license/CDDL.
10 10 .\"
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PSETFLAGS 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Psetflags ,
19 19 .Nm Punsetflags
20 20 .Nd set and unset process flags
21 -.Sh SYNOPSIS
21 +.Sh LIBRARY
22 22 .Lb libproc
23 +.Sh SYNOPSIS
23 24 .In libproc.h
24 25 .Ft int
25 26 .Fo Psetflags
26 27 .Fa "struct ps_prochandle *P"
27 28 .Fa "long flags"
28 29 .Fc
29 30 .Ft int
30 31 .Fo Punsetflags
31 32 .Fa "struct ps_prochandle *P"
32 33 .Fa "long flags"
33 34 .Fc
34 35 .Sh DESCRIPTION
35 36 The
36 37 .Fn Psetflags
37 38 and
38 39 .Fn Punsetflags
39 40 functions manipulate the process flags for the process handle
40 41 .Fa P .
41 42 The process flags determine how the process behaves in the face of
42 43 various actions.
43 44 For example, setting the
44 45 .Sy PR_FORK
45 46 flag indicates that the tracing flags of the process and the
46 47 inherit-on-fork mode should be set on children.
47 48 A full list of the process flags is available in the
48 49 .Sy PCSET
49 50 section in
50 51 .Xr proc 4 .
51 52 .Pp
52 53 The
53 54 .Fn Psetflags
54 55 function sets the flags specified in
55 56 .Fa flags
56 57 by doing a bitwise-inclusive-OR with the previously set flags.
57 58 .Pp
58 59 The
59 60 .Fn Punsetflags
60 61 function removes the flags specified in
61 62 .Fa flags
62 63 from the tracing flags of the process.
63 64 Items not listed in
64 65 .Fa flags
65 66 will remain.
66 67 .Pp
67 68 To see the current set of flags active on the process, check the
68 69 .Sy pr_flags
69 70 member of the
70 71 .Sy pstatus_t
71 72 for the process.
72 73 It can be obtained through the
73 74 .Xr Pstatus 3PROC
74 75 function.
75 76 .Pp
76 77 Note, attempting to modify the process flags only works on active
77 78 processes.
78 79 Attempting to call these functions of process handles corresponding to core
79 80 files, zombie processes, or files, will result in an error.
80 81 .Sh RETURN VALUES
81 82 Upon successful completion, the
82 83 .Fn Psetflags
83 84 and
84 85 .Fn Punsetflags
85 86 functions return
86 87 .Sy 0 .
87 88 Otherwise,
88 89 .Sy -1
89 90 is returned
90 91 and
91 92 .Sy errno
92 93 is set to indicate the error.
93 94 .Sh ERRORS
94 95 For a full list of possible errors see the
95 96 .Sy DIAGNOSTICS
96 97 section in
97 98 .Xr proc 4 .
98 99 .Sh INTERFACE STABILITY
99 100 .Sy Uncommitted
100 101 .Sh MT-LEVEL
101 102 See
102 103 .Sy LOCKING
103 104 in
104 105 .Xr libproc 3LIB .
105 106 .Sh SEE ALSO
106 107 .Xr libproc 3LIB ,
107 108 .Xr Pstatus 3PROC ,
108 109 .Xr proc 4
↓ open down ↓ |
76 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX