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/Psetzoneid.3proc
+++ new/usr/src/man/man3proc/Psetzoneid.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.
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
10 10 .\"
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PSETZONEID 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Psetzoneid
19 19 .Nd change processes zone id
20 -.Sh SYNOPSIS
20 +.Sh LIBRARY
21 21 .Lb libproc
22 +.Sh SYNOPSIS
22 23 .In libproc.h
23 24 .Ft int
24 25 .Fo Psetzoneid
25 26 .Fa "struct ps_prochandle *P"
26 27 .Fa "zoneid_t zoneid"
27 28 .Fc
28 29 .Sh DESCRIPTION
29 30 The
30 31 .Fn Psetzoneid
31 32 function moves the process handle
32 33 .Fa P
33 34 into the zone specified by
34 35 .Fa zoneid .
35 36 A process that is in the non-global zone may only move between the
36 37 global zone and its original zone.
37 38 A process that is in the global zone may not use this interface to enter a
38 39 non-global zone.
39 40 This function will fail if called from a non-global zone.
40 41 This function only manipulates the processes credentials.
41 42 .Pp
42 43 Care should be taken when moving a process around temporarily, such that
43 44 if the process that is manipulating
44 45 .Fa P
45 46 dies, it does not cause
46 47 .Fa P
47 48 to resume running while still in the global zone.
48 49 It is suggested that the
49 50 .Sy PR_KLC
50 51 flag is set with
51 52 .Xr Psetflags 3PROC
52 53 which will cause the process to terminate if the process that holds
53 54 .Fa P
54 55 unexpectedly terminates.
55 56 See
56 57 .Xr proc 4
57 58 for more information on the
58 59 .Sy PR_KLC
59 60 flag.
60 61 .Pp
61 62 Note, only active processes may change their zone.
62 63 It is an error to call this function on process handles that correspond to core
63 64 files, zombie processes, or files.
64 65 .Sh RETURN VALUES
65 66 Upon successful completion, the
66 67 .Fn Psetzoneid
67 68 function returns
68 69 .Sy 0
69 70 and changes the zone for
70 71 .Fa P .
71 72 Otherwise,
72 73 .Sy -1
73 74 is returned and
74 75 .Sy errno
75 76 is set.
76 77 .Sh ERRORS
77 78 For a full list of possible errors see the
78 79 .Sy DIAGNOSTICS
79 80 section in
80 81 .Xr proc 4 .
81 82 .Pp
82 83 The
83 84 .Fn Psetzoneid
84 85 function will fail if:
85 86 .Bl -tag -width Er
86 87 .It Er EINVAL
87 88 .Fa zoneid
88 89 does not correspond to an existing zone or the zone id is not the global
89 90 zone or the original zone of
90 91 .Fa P .
91 92 .It Er EPERM
92 93 The caller does not hold the required privileges for zone configuration.
93 94 .El
94 95 .Sh INTERFACE STABILITY
95 96 .Sy Uncommitted
96 97 .Sh MT-LEVEL
97 98 See
98 99 .Sy LOCKING
99 100 in
100 101 .Xr libproc 3LIB .
101 102 .Sh SEE ALSO
102 103 .Xr libproc 3LIB ,
103 104 .Xr proc 4 ,
104 105 .Xr privileges 5 ,
105 106 .Xr zones 5
↓ open down ↓ |
74 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX