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.man.txt
+++ new/usr/src/man/man3proc/Psetflags.3proc.man.txt
1 1 PSETFLAGS(3PROC) Process Control Library Functions PSETFLAGS(3PROC)
2 2
3 3 NAME
4 4 Psetflags, Punsetflags - set and unset process flags
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 Psetflags(struct ps_prochandle *P, long flags);
12 14
13 15 int
14 16 Punsetflags(struct ps_prochandle *P, long flags);
15 17
16 18 DESCRIPTION
17 19 The Psetflags() and Punsetflags() functions manipulate the process flags
18 20 for the process handle P. The process flags determine how the process
19 21 behaves in the face of various actions. For example, setting the PR_FORK
20 22 flag indicates that the tracing flags of the process and the inherit-on-
21 23 fork mode should be set on children. A full list of the process flags is
22 24 available in the PCSET section in proc(4).
23 25
24 26 The Psetflags() function sets the flags specified in flags by doing a
25 27 bitwise-inclusive-OR with the previously set flags.
26 28
27 29 The Punsetflags() function removes the flags specified in flags from the
28 30 tracing flags of the process. Items not listed in flags will remain.
29 31
30 32 To see the current set of flags active on the process, check the pr_flags
31 33 member of the pstatus_t for the process. It can be obtained through the
32 34 Pstatus(3PROC) function.
33 35
34 36 Note, attempting to modify the process flags only works on active
35 37 processes. Attempting to call these functions of process handles
36 38 corresponding to core files, zombie processes, or files, will result in
37 39 an error.
38 40
39 41 RETURN VALUES
40 42 Upon successful completion, the Psetflags() and Punsetflags() functions
41 43 return 0. Otherwise, -1 is returned and errno is set to indicate the
42 44 error.
43 45
44 46 ERRORS
45 47 For a full list of possible errors see the DIAGNOSTICS section in
46 48 proc(4).
47 49
48 50 INTERFACE STABILITY
49 51 Uncommitted
50 52
51 53 MT-LEVEL
52 54 See LOCKING in libproc(3LIB).
53 55
54 56 SEE ALSO
55 57 libproc(3LIB), Pstatus(3PROC), proc(4)
56 58
57 59 illumos May 11, 2016 illumos
↓ open down ↓ |
40 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX