OSDN Git Service

(split) LDP: Support po4a.
[linuxjm/LDP_man-pages.git] / po4a / process / po / process.pot
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2012-03-19 23:50+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: build/C/man2/acct.2:32 build/C/man5/acct.5:23
21 #, no-wrap
22 msgid "ACCT"
23 msgstr ""
24
25 #. type: TH
26 #: build/C/man2/acct.2:32
27 #, no-wrap
28 msgid "2008-06-16"
29 msgstr ""
30
31 #. type: TH
32 #: build/C/man2/acct.2:32 build/C/man5/acct.5:23 build/C/man7/capabilities.7:47 build/C/man2/capget.2:11 build/C/man7/cpuset.7:24 build/C/man7/credentials.7:25 build/C/man2/getgid.2:25 build/C/man2/getgroups.2:31 build/C/man2/getpid.2:23 build/C/man2/getpriority.2:46 build/C/man2/getresuid.2:27 build/C/man2/getrlimit.2:64 build/C/man2/getrusage.2:39 build/C/man2/getsid.2:25 build/C/man2/getuid.2:26 build/C/man2/iopl.2:33 build/C/man2/ioprio_set.2:25 build/C/man2/ipc.2:26 build/C/man2/seteuid.2:27 build/C/man2/setfsgid.2:29 build/C/man2/setfsuid.2:29 build/C/man2/setgid.2:27 build/C/man2/setpgid.2:46 build/C/man2/setresuid.2:26 build/C/man2/setreuid.2:43 build/C/man2/setsid.2:29 build/C/man2/setuid.2:28 build/C/man7/svipc.7:25 build/C/man3/ulimit.3:27
33 #, no-wrap
34 msgid "Linux"
35 msgstr ""
36
37 #. type: TH
38 #: build/C/man2/acct.2:32 build/C/man5/acct.5:23 build/C/man7/capabilities.7:47 build/C/man2/capget.2:11 build/C/man7/cpuset.7:24 build/C/man7/credentials.7:25 build/C/man2/getgid.2:25 build/C/man2/getgroups.2:31 build/C/man2/getpid.2:23 build/C/man2/getpriority.2:46 build/C/man2/getresuid.2:27 build/C/man2/getrlimit.2:64 build/C/man2/getrusage.2:39 build/C/man2/getsid.2:25 build/C/man2/getuid.2:26 build/C/man2/iopl.2:33 build/C/man2/ioprio_set.2:25 build/C/man2/ipc.2:26 build/C/man2/seteuid.2:27 build/C/man2/setfsgid.2:29 build/C/man2/setfsuid.2:29 build/C/man2/setgid.2:27 build/C/man2/setpgid.2:46 build/C/man2/setresuid.2:26 build/C/man2/setreuid.2:43 build/C/man2/setsid.2:29 build/C/man2/setuid.2:28 build/C/man7/svipc.7:25 build/C/man3/ulimit.3:27
39 #, no-wrap
40 msgid "Linux Programmer's Manual"
41 msgstr ""
42
43 #. type: SH
44 #: build/C/man2/acct.2:33 build/C/man5/acct.5:24 build/C/man7/capabilities.7:48 build/C/man2/capget.2:12 build/C/man7/cpuset.7:25 build/C/man7/credentials.7:26 build/C/man2/getgid.2:26 build/C/man2/getgroups.2:32 build/C/man2/getpid.2:24 build/C/man2/getpriority.2:47 build/C/man2/getresuid.2:28 build/C/man2/getrlimit.2:65 build/C/man2/getrusage.2:40 build/C/man2/getsid.2:26 build/C/man2/getuid.2:27 build/C/man2/iopl.2:34 build/C/man2/ioprio_set.2:26 build/C/man2/ipc.2:27 build/C/man2/seteuid.2:28 build/C/man2/setfsgid.2:30 build/C/man2/setfsuid.2:30 build/C/man2/setgid.2:28 build/C/man2/setpgid.2:47 build/C/man2/setresuid.2:27 build/C/man2/setreuid.2:44 build/C/man2/setsid.2:30 build/C/man2/setuid.2:29 build/C/man7/svipc.7:26 build/C/man3/ulimit.3:28
45 #, no-wrap
46 msgid "NAME"
47 msgstr ""
48
49 #. type: Plain text
50 #: build/C/man2/acct.2:35
51 msgid "acct - switch process accounting on or off"
52 msgstr ""
53
54 #. type: SH
55 #: build/C/man2/acct.2:35 build/C/man5/acct.5:26 build/C/man2/capget.2:14 build/C/man2/getgid.2:28 build/C/man2/getgroups.2:34 build/C/man2/getpid.2:26 build/C/man2/getpriority.2:49 build/C/man2/getresuid.2:30 build/C/man2/getrlimit.2:67 build/C/man2/getrusage.2:42 build/C/man2/getsid.2:28 build/C/man2/getuid.2:29 build/C/man2/iopl.2:36 build/C/man2/ioprio_set.2:28 build/C/man2/ipc.2:29 build/C/man2/seteuid.2:30 build/C/man2/setfsgid.2:32 build/C/man2/setfsuid.2:32 build/C/man2/setgid.2:30 build/C/man2/setpgid.2:49 build/C/man2/setresuid.2:29 build/C/man2/setreuid.2:46 build/C/man2/setsid.2:32 build/C/man2/setuid.2:31 build/C/man7/svipc.7:28 build/C/man3/ulimit.3:30
56 #, no-wrap
57 msgid "SYNOPSIS"
58 msgstr ""
59
60 #. type: Plain text
61 #: build/C/man2/acct.2:39
62 #, no-wrap
63 msgid "B<#include E<lt>unistd.hE<gt>>\n"
64 msgstr ""
65
66 #. type: Plain text
67 #: build/C/man2/acct.2:41
68 #, no-wrap
69 msgid "B<int acct(const char *>I<filename>B<);>\n"
70 msgstr ""
71
72 #. type: Plain text
73 #: build/C/man2/acct.2:47 build/C/man2/getgroups.2:48 build/C/man2/getrlimit.2:84 build/C/man2/getsid.2:36 build/C/man2/seteuid.2:42 build/C/man2/setpgid.2:69 build/C/man2/setreuid.2:58
74 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
75 msgstr ""
76
77 #. type: Plain text
78 #: build/C/man2/acct.2:51
79 msgid "B<acct>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
80 msgstr ""
81
82 #. type: SH
83 #: build/C/man2/acct.2:51 build/C/man5/acct.5:28 build/C/man7/capabilities.7:50 build/C/man2/capget.2:20 build/C/man7/cpuset.7:27 build/C/man7/credentials.7:28 build/C/man2/getgid.2:36 build/C/man2/getgroups.2:52 build/C/man2/getpid.2:34 build/C/man2/getpriority.2:57 build/C/man2/getresuid.2:38 build/C/man2/getrlimit.2:88 build/C/man2/getrusage.2:48 build/C/man2/getsid.2:49 build/C/man2/getuid.2:37 build/C/man2/iopl.2:40 build/C/man2/ioprio_set.2:33 build/C/man2/ipc.2:35 build/C/man2/seteuid.2:51 build/C/man2/setfsgid.2:37 build/C/man2/setfsuid.2:37 build/C/man2/setgid.2:36 build/C/man2/setpgid.2:96 build/C/man2/setresuid.2:37 build/C/man2/setreuid.2:68 build/C/man2/setsid.2:39 build/C/man2/setuid.2:37 build/C/man7/svipc.7:36 build/C/man3/ulimit.3:34
84 #, no-wrap
85 msgid "DESCRIPTION"
86 msgstr ""
87
88 #. type: Plain text
89 #: build/C/man2/acct.2:60
90 msgid ""
91 "The B<acct>()  system call enables or disables process accounting.  If "
92 "called with the name of an existing file as its argument, accounting is "
93 "turned on, and records for each terminating process are appended to "
94 "I<filename> as it terminates.  An argument of NULL causes accounting to be "
95 "turned off."
96 msgstr ""
97
98 #. type: SH
99 #: build/C/man2/acct.2:60 build/C/man2/capget.2:152 build/C/man2/getgroups.2:92 build/C/man2/getpriority.2:105 build/C/man2/getresuid.2:49 build/C/man2/getrlimit.2:430 build/C/man2/getrusage.2:180 build/C/man2/getsid.2:57 build/C/man2/iopl.2:65 build/C/man2/ioprio_set.2:139 build/C/man2/seteuid.2:65 build/C/man2/setfsgid.2:67 build/C/man2/setfsuid.2:67 build/C/man2/setgid.2:51 build/C/man2/setpgid.2:170 build/C/man2/setresuid.2:64 build/C/man2/setreuid.2:89 build/C/man2/setsid.2:50 build/C/man2/setuid.2:68 build/C/man3/ulimit.3:67
100 #, no-wrap
101 msgid "RETURN VALUE"
102 msgstr ""
103
104 #. type: Plain text
105 #: build/C/man2/acct.2:65 build/C/man2/capget.2:157 build/C/man2/getresuid.2:54 build/C/man2/getrusage.2:185 build/C/man2/iopl.2:70 build/C/man2/seteuid.2:70 build/C/man2/setgid.2:56 build/C/man2/setresuid.2:69 build/C/man2/setreuid.2:94 build/C/man2/setuid.2:73
106 msgid ""
107 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
108 "appropriately."
109 msgstr ""
110
111 #. type: SH
112 #: build/C/man2/acct.2:65 build/C/man2/capget.2:171 build/C/man7/cpuset.7:1099 build/C/man2/getgid.2:42 build/C/man2/getgroups.2:106 build/C/man2/getpid.2:42 build/C/man2/getpriority.2:118 build/C/man2/getresuid.2:54 build/C/man2/getrlimit.2:435 build/C/man2/getrusage.2:185 build/C/man2/getsid.2:62 build/C/man2/getuid.2:43 build/C/man2/iopl.2:70 build/C/man2/ioprio_set.2:159 build/C/man2/seteuid.2:70 build/C/man2/setgid.2:56 build/C/man2/setpgid.2:191 build/C/man2/setresuid.2:69 build/C/man2/setreuid.2:94 build/C/man2/setsid.2:57 build/C/man2/setuid.2:73 build/C/man3/ulimit.3:74
113 #, no-wrap
114 msgid "ERRORS"
115 msgstr ""
116
117 #. type: TP
118 #: build/C/man2/acct.2:66 build/C/man7/cpuset.7:1115 build/C/man7/cpuset.7:1122 build/C/man7/cpuset.7:1128 build/C/man7/cpuset.7:1136 build/C/man7/cpuset.7:1143 build/C/man2/getpriority.2:138 build/C/man2/setpgid.2:192
119 #, no-wrap
120 msgid "B<EACCES>"
121 msgstr ""
122
123 #. type: Plain text
124 #: build/C/man2/acct.2:77
125 msgid ""
126 "Write permission is denied for the specified file, or search permission is "
127 "denied for one of the directories in the path prefix of I<filename> (see "
128 "also B<path_resolution>(7)), or I<filename> is not a regular file."
129 msgstr ""
130
131 #. type: TP
132 #: build/C/man2/acct.2:77 build/C/man2/capget.2:172 build/C/man7/cpuset.7:1171 build/C/man2/getgroups.2:107 build/C/man2/getresuid.2:55 build/C/man2/getrlimit.2:436 build/C/man2/getrusage.2:186
133 #, no-wrap
134 msgid "B<EFAULT>"
135 msgstr ""
136
137 #. type: Plain text
138 #: build/C/man2/acct.2:81
139 msgid "I<filename> points outside your accessible address space."
140 msgstr ""
141
142 #. type: TP
143 #: build/C/man2/acct.2:81 build/C/man7/cpuset.7:1237 build/C/man7/cpuset.7:1245
144 #, no-wrap
145 msgid "B<EIO>"
146 msgstr ""
147
148 #. type: Plain text
149 #: build/C/man2/acct.2:85
150 msgid "Error writing to the file I<filename>."
151 msgstr ""
152
153 #. type: TP
154 #: build/C/man2/acct.2:85
155 #, no-wrap
156 msgid "B<EISDIR>"
157 msgstr ""
158
159 #. type: Plain text
160 #: build/C/man2/acct.2:89
161 msgid "I<filename> is a directory."
162 msgstr ""
163
164 #. type: TP
165 #: build/C/man2/acct.2:89
166 #, no-wrap
167 msgid "B<ELOOP>"
168 msgstr ""
169
170 #. type: Plain text
171 #: build/C/man2/acct.2:93
172 msgid "Too many symbolic links were encountered in resolving I<filename>."
173 msgstr ""
174
175 #. type: TP
176 #: build/C/man2/acct.2:93 build/C/man7/cpuset.7:1250 build/C/man7/cpuset.7:1257 build/C/man7/cpuset.7:1262
177 #, no-wrap
178 msgid "B<ENAMETOOLONG>"
179 msgstr ""
180
181 #. type: Plain text
182 #: build/C/man2/acct.2:97
183 msgid "I<filename> was too long."
184 msgstr ""
185
186 #. type: TP
187 #: build/C/man2/acct.2:97
188 #, no-wrap
189 msgid "B<ENFILE>"
190 msgstr ""
191
192 #. type: Plain text
193 #: build/C/man2/acct.2:100
194 msgid "The system limit on the total number of open files has been reached."
195 msgstr ""
196
197 #. type: TP
198 #: build/C/man2/acct.2:100 build/C/man7/cpuset.7:1274 build/C/man7/cpuset.7:1279
199 #, no-wrap
200 msgid "B<ENOENT>"
201 msgstr ""
202
203 #. type: Plain text
204 #: build/C/man2/acct.2:103
205 msgid "The specified filename does not exist."
206 msgstr ""
207
208 #. type: TP
209 #: build/C/man2/acct.2:103 build/C/man7/cpuset.7:1286 build/C/man2/getgroups.2:127
210 #, no-wrap
211 msgid "B<ENOMEM>"
212 msgstr ""
213
214 #. type: Plain text
215 #: build/C/man2/acct.2:106 build/C/man2/getgroups.2:130
216 msgid "Out of memory."
217 msgstr ""
218
219 #. type: TP
220 #: build/C/man2/acct.2:106 build/C/man2/iopl.2:75
221 #, no-wrap
222 msgid "B<ENOSYS>"
223 msgstr ""
224
225 #. type: Plain text
226 #: build/C/man2/acct.2:112
227 msgid ""
228 "BSD process accounting has not been enabled when the operating system kernel "
229 "was compiled.  The kernel configuration parameter controlling this feature "
230 "is B<CONFIG_BSD_PROCESS_ACCT>."
231 msgstr ""
232
233 #. type: TP
234 #: build/C/man2/acct.2:112 build/C/man7/cpuset.7:1313
235 #, no-wrap
236 msgid "B<ENOTDIR>"
237 msgstr ""
238
239 #. type: Plain text
240 #: build/C/man2/acct.2:117
241 msgid "A component used as a directory in I<filename> is not in fact a directory."
242 msgstr ""
243
244 #. type: TP
245 #: build/C/man2/acct.2:117 build/C/man2/capget.2:183 build/C/man2/capget.2:188 build/C/man7/cpuset.7:1318 build/C/man2/getgroups.2:130 build/C/man2/getpriority.2:150 build/C/man2/getrlimit.2:452 build/C/man2/getsid.2:63 build/C/man2/iopl.2:78 build/C/man2/ioprio_set.2:169 build/C/man2/seteuid.2:73 build/C/man2/setgid.2:57 build/C/man2/setpgid.2:206 build/C/man2/setresuid.2:77 build/C/man2/setreuid.2:95 build/C/man2/setsid.2:58 build/C/man2/setuid.2:83 build/C/man3/ulimit.3:75
246 #, no-wrap
247 msgid "B<EPERM>"
248 msgstr ""
249
250 #. type: Plain text
251 #: build/C/man2/acct.2:123
252 msgid ""
253 "The calling process has insufficient privilege to enable process "
254 "accounting.  On Linux the B<CAP_SYS_PACCT> capability is required."
255 msgstr ""
256
257 #. type: TP
258 #: build/C/man2/acct.2:123
259 #, no-wrap
260 msgid "B<EROFS>"
261 msgstr ""
262
263 #. type: Plain text
264 #: build/C/man2/acct.2:127
265 msgid "I<filename> refers to a file on a read-only file system."
266 msgstr ""
267
268 #. type: TP
269 #: build/C/man2/acct.2:127
270 #, no-wrap
271 msgid "B<EUSERS>"
272 msgstr ""
273
274 #. type: Plain text
275 #: build/C/man2/acct.2:130
276 msgid "There are no more free file structures or we ran out of memory."
277 msgstr ""
278
279 #. type: SH
280 #: build/C/man2/acct.2:130 build/C/man5/acct.5:152 build/C/man7/capabilities.7:890 build/C/man2/capget.2:210 build/C/man7/credentials.7:232 build/C/man2/getgid.2:44 build/C/man2/getgroups.2:133 build/C/man2/getpid.2:44 build/C/man2/getpriority.2:158 build/C/man2/getresuid.2:66 build/C/man2/getrlimit.2:473 build/C/man2/getrusage.2:194 build/C/man2/getsid.2:78 build/C/man2/getuid.2:45 build/C/man2/iopl.2:85 build/C/man2/ioprio_set.2:186 build/C/man2/ipc.2:46 build/C/man2/seteuid.2:89 build/C/man2/setfsgid.2:78 build/C/man2/setfsuid.2:78 build/C/man2/setgid.2:74 build/C/man2/setpgid.2:225 build/C/man2/setresuid.2:83 build/C/man2/setreuid.2:111 build/C/man2/setsid.2:64 build/C/man2/setuid.2:90 build/C/man3/ulimit.3:78
281 #, no-wrap
282 msgid "CONFORMING TO"
283 msgstr ""
284
285 #.  SVr4 documents an EBUSY error condition, but no EISDIR or ENOSYS.
286 #.  Also AIX and HP-UX document EBUSY (attempt is made
287 #.  to enable accounting when it is already enabled), as does Solaris
288 #.  (attempt is made to enable accounting using the same file that is
289 #.  currently being used).
290 #. type: Plain text
291 #: build/C/man2/acct.2:137
292 msgid "SVr4, 4.3BSD (but not POSIX)."
293 msgstr ""
294
295 #. type: SH
296 #: build/C/man2/acct.2:137 build/C/man5/acct.5:156 build/C/man7/capabilities.7:895 build/C/man2/capget.2:212 build/C/man7/cpuset.7:1340 build/C/man7/credentials.7:238 build/C/man2/getgid.2:46 build/C/man2/getgroups.2:141 build/C/man2/getpid.2:46 build/C/man2/getpriority.2:161 build/C/man2/getresuid.2:69 build/C/man2/getrlimit.2:496 build/C/man2/getrusage.2:205 build/C/man2/getsid.2:80 build/C/man2/getuid.2:47 build/C/man2/getuid.2:57 build/C/man2/iopl.2:89 build/C/man2/ioprio_set.2:188 build/C/man2/ipc.2:50 build/C/man2/seteuid.2:91 build/C/man2/setfsgid.2:82 build/C/man2/setfsuid.2:82 build/C/man2/setgid.2:64 build/C/man2/setpgid.2:247 build/C/man2/setresuid.2:86 build/C/man2/setreuid.2:117 build/C/man2/setsid.2:66 build/C/man2/setuid.2:95
297 #, no-wrap
298 msgid "NOTES"
299 msgstr ""
300
301 #. type: Plain text
302 #: build/C/man2/acct.2:140
303 msgid ""
304 "No accounting is produced for programs running when a system crash occurs.  "
305 "In particular, nonterminating processes are never accounted for."
306 msgstr ""
307
308 #. type: Plain text
309 #: build/C/man2/acct.2:143
310 msgid ""
311 "The structure of the records written to the accounting file is described in "
312 "B<acct>(5)."
313 msgstr ""
314
315 #. type: SH
316 #: build/C/man2/acct.2:143 build/C/man5/acct.5:173 build/C/man7/capabilities.7:943 build/C/man2/capget.2:219 build/C/man7/cpuset.7:1487 build/C/man7/credentials.7:250 build/C/man2/getgid.2:62 build/C/man2/getgroups.2:171 build/C/man2/getpid.2:98 build/C/man2/getpriority.2:223 build/C/man2/getresuid.2:85 build/C/man2/getrlimit.2:620 build/C/man2/getrusage.2:245 build/C/man2/getsid.2:83 build/C/man2/getuid.2:73 build/C/man2/iopl.2:98 build/C/man2/ioprio_set.2:317 build/C/man2/ipc.2:58 build/C/man2/seteuid.2:117 build/C/man2/setfsgid.2:110 build/C/man2/setfsuid.2:110 build/C/man2/setgid.2:76 build/C/man2/setpgid.2:315 build/C/man2/setresuid.2:106 build/C/man2/setreuid.2:157 build/C/man2/setsid.2:83 build/C/man2/setuid.2:118 build/C/man7/svipc.7:320 build/C/man3/ulimit.3:83
317 #, no-wrap
318 msgid "SEE ALSO"
319 msgstr ""
320
321 #. type: Plain text
322 #: build/C/man2/acct.2:145
323 msgid "B<acct>(5)"
324 msgstr ""
325
326 #. type: SH
327 #: build/C/man2/acct.2:145 build/C/man5/acct.5:178 build/C/man7/capabilities.7:962 build/C/man2/capget.2:223 build/C/man7/cpuset.7:1504 build/C/man7/credentials.7:281 build/C/man2/getgid.2:67 build/C/man2/getgroups.2:178 build/C/man2/getpid.2:108 build/C/man2/getpriority.2:231 build/C/man2/getresuid.2:91 build/C/man2/getrlimit.2:637 build/C/man2/getrusage.2:252 build/C/man2/getsid.2:87 build/C/man2/getuid.2:78 build/C/man2/iopl.2:101 build/C/man2/ioprio_set.2:323 build/C/man2/ipc.2:71 build/C/man2/seteuid.2:124 build/C/man2/setfsgid.2:115 build/C/man2/setfsuid.2:115 build/C/man2/setgid.2:82 build/C/man2/setpgid.2:322 build/C/man2/setresuid.2:115 build/C/man2/setreuid.2:165 build/C/man2/setsid.2:89 build/C/man2/setuid.2:125 build/C/man7/svipc.7:334 build/C/man3/ulimit.3:88
328 #, no-wrap
329 msgid "COLOPHON"
330 msgstr ""
331
332 #. type: Plain text
333 #: build/C/man2/acct.2:152 build/C/man5/acct.5:185 build/C/man7/capabilities.7:969 build/C/man2/capget.2:230 build/C/man7/cpuset.7:1511 build/C/man7/credentials.7:288 build/C/man2/getgid.2:74 build/C/man2/getgroups.2:185 build/C/man2/getpid.2:115 build/C/man2/getpriority.2:238 build/C/man2/getresuid.2:98 build/C/man2/getrlimit.2:644 build/C/man2/getrusage.2:259 build/C/man2/getsid.2:94 build/C/man2/getuid.2:85 build/C/man2/iopl.2:108 build/C/man2/ioprio_set.2:330 build/C/man2/ipc.2:78 build/C/man2/seteuid.2:131 build/C/man2/setfsgid.2:122 build/C/man2/setfsuid.2:122 build/C/man2/setgid.2:89 build/C/man2/setpgid.2:329 build/C/man2/setresuid.2:122 build/C/man2/setreuid.2:172 build/C/man2/setsid.2:96 build/C/man2/setuid.2:132 build/C/man7/svipc.7:341 build/C/man3/ulimit.3:95
334 msgid ""
335 "This page is part of release 3.35 of the Linux I<man-pages> project.  A "
336 "description of the project, and information about reporting bugs, can be "
337 "found at http://man7.org/linux/man-pages/."
338 msgstr ""
339
340 #. type: TH
341 #: build/C/man5/acct.5:23
342 #, no-wrap
343 msgid "2008-06-15"
344 msgstr ""
345
346 #. type: Plain text
347 #: build/C/man5/acct.5:26
348 msgid "acct - process accounting file"
349 msgstr ""
350
351 #. type: Plain text
352 #: build/C/man5/acct.5:28
353 msgid "B<#include E<lt>sys/acct.hE<gt>>"
354 msgstr ""
355
356 #. type: Plain text
357 #: build/C/man5/acct.5:34
358 msgid ""
359 "If the kernel is built with the process accounting option enabled "
360 "(B<CONFIG_BSD_PROCESS_ACCT>), then calling B<acct>(2)  starts process "
361 "accounting, for example:"
362 msgstr ""
363
364 #. type: Plain text
365 #: build/C/man5/acct.5:37
366 msgid "acct(\"/var/log/pacct\");"
367 msgstr ""
368
369 #. type: Plain text
370 #: build/C/man5/acct.5:45
371 msgid ""
372 "When process accounting is enabled, the kernel writes a record to the "
373 "accounting file as each process on the system terminates.  This record "
374 "contains information about the terminated process, and is defined in "
375 "I<E<lt>sys/acct.hE<gt>> as follows:"
376 msgstr ""
377
378 #. type: Plain text
379 #: build/C/man5/acct.5:49
380 #, no-wrap
381 msgid "#define ACCT_COMM 16\n"
382 msgstr ""
383
384 #. type: Plain text
385 #: build/C/man5/acct.5:51
386 #, no-wrap
387 msgid "typedef u_int16_t comp_t;\n"
388 msgstr ""
389
390 #. type: Plain text
391 #: build/C/man5/acct.5:75
392 #, no-wrap
393 msgid ""
394 "struct acct {\n"
395 "    char ac_flag;           /* Accounting flags */\n"
396 "    u_int16_t ac_uid;       /* Accounting user ID */\n"
397 "    u_int16_t ac_gid;       /* Accounting group ID */\n"
398 "    u_int16_t ac_tty;       /* Controlling terminal */\n"
399 "    u_int32_t ac_btime;     /* Process creation time\n"
400 "                               (seconds since the Epoch) */\n"
401 "    comp_t    ac_utime;     /* User CPU time */\n"
402 "    comp_t    ac_stime;     /* System CPU time */\n"
403 "    comp_t    ac_etime;     /* Elapsed time */\n"
404 "    comp_t    ac_mem;       /* Average memory usage (kB) */\n"
405 "    comp_t    ac_io;        /* Characters transferred (unused) */\n"
406 "    comp_t    ac_rw;        /* Blocks read or written (unused) */\n"
407 "    comp_t    ac_minflt;    /* Minor page faults */\n"
408 "    comp_t    ac_majflt;    /* Major page faults */\n"
409 "    comp_t    ac_swaps;     /* Number of swaps (unused) */\n"
410 "    u_int32_t ac_exitcode;  /* Process termination status\n"
411 "                               (see wait(2)) */\n"
412 "    char      ac_comm[ACCT_COMM+1];\n"
413 "                            /* Command name (basename of last\n"
414 "                               executed command; null-terminated) */\n"
415 "    char      ac_pad[I<X>];    /* padding bytes */\n"
416 "};\n"
417 msgstr ""
418
419 #. type: Plain text
420 #: build/C/man5/acct.5:82
421 #, no-wrap
422 msgid ""
423 "enum {          /* Bits that may be set in ac_flag field */\n"
424 "    AFORK = 0x01,           /* Has executed fork, but no exec */\n"
425 "    ASU   = 0x02,           /* Used superuser privileges */\n"
426 "    ACORE = 0x08,           /* Dumped core */\n"
427 "    AXSIG = 0x10            /* Killed by a signal */\n"
428 "};\n"
429 msgstr ""
430
431 #. type: Plain text
432 #: build/C/man5/acct.5:92
433 msgid ""
434 "The I<comp_t> data type is a floating-point value consisting of a 3-bit, "
435 "base-8 exponent, and a 13-bit mantissa.  A value, I<c>, of this type can be "
436 "converted to a (long) integer as follows:"
437 msgstr ""
438
439 #. type: Plain text
440 #: build/C/man5/acct.5:95
441 #, no-wrap
442 msgid "    v = (c & 0x1fff) E<lt>E<lt> (((c E<gt>E<gt> 13) & 0x7) * 3);\n"
443 msgstr ""
444
445 #. type: Plain text
446 #: build/C/man5/acct.5:105
447 msgid ""
448 "The I<ac_utime>, I<ac_stime>, and I<ac_etime> fields measure time in \"clock "
449 "ticks\"; divide these values by I<sysconf(_SC_CLK_TCK)> to convert them to "
450 "seconds."
451 msgstr ""
452
453 #. type: SS
454 #: build/C/man5/acct.5:105
455 #, no-wrap
456 msgid "Version 3 Accounting File Format"
457 msgstr ""
458
459 #. type: Plain text
460 #: build/C/man5/acct.5:120
461 msgid ""
462 "Since kernel 2.6.8, an optional alternative version of the accounting file "
463 "can be produced if the B<CONFIG_BSD_PROCESS_ACCT_V3> option is set when "
464 "building the kernel.  With this option is set, the records written to the "
465 "accounting file contain additional fields, and the width of I<c_uid> and "
466 "I<ac_gid> fields is widened from 16 to 32 bits (in line with the increased "
467 "size of UID and GIDs in Linux 2.4 and later).  The records are defined as "
468 "follows:"
469 msgstr ""
470
471 #. type: Plain text
472 #: build/C/man5/acct.5:145
473 #, no-wrap
474 msgid ""
475 "struct acct_v3 {\n"
476 "    char      ac_flag;      /* Flags */\n"
477 "    char      ac_version;   /* Always set to ACCT_VERSION (3) */\n"
478 "    u_int16_t ac_tty;       /* Controlling terminal */\n"
479 "    u_int32_t ac_exitcode;  /* Process termination status */\n"
480 "    u_int32_t ac_uid;       /* Real user ID */\n"
481 "    u_int32_t ac_gid;       /* Real group ID */\n"
482 "    u_int32_t ac_pid;       /* Process ID */\n"
483 "    u_int32_t ac_ppid;      /* Parent process ID */\n"
484 "    u_int32_t ac_btime;     /* Process creation time */\n"
485 "    float     ac_etime;     /* Elapsed time */\n"
486 "    comp_t    ac_utime;     /* User CPU time */\n"
487 "    comp_t    ac_stime;     /* System time */\n"
488 "    comp_t    ac_mem;       /* Average memory usage (kB) */\n"
489 "    comp_t    ac_io;        /* Characters transferred (unused) */\n"
490 "    comp_t    ac_rw;        /* Blocks read or written\n"
491 "                               (unused) */\n"
492 "    comp_t    ac_minflt;    /* Minor page faults */\n"
493 "    comp_t    ac_majflt;    /* Major page faults */\n"
494 "    comp_t    ac_swaps;     /* Number of swaps (unused) */\n"
495 "    char      ac_comm[ACCT_COMM]; /* Command name */\n"
496 "};\n"
497 msgstr ""
498
499 #. type: SH
500 #: build/C/man5/acct.5:148 build/C/man7/cpuset.7:1337 build/C/man2/getresuid.2:59 build/C/man2/getrlimit.2:468 build/C/man2/getsid.2:74 build/C/man2/ioprio_set.2:183 build/C/man2/setfsgid.2:74 build/C/man2/setfsuid.2:74 build/C/man2/setresuid.2:81
501 #, no-wrap
502 msgid "VERSIONS"
503 msgstr ""
504
505 #. type: Plain text
506 #: build/C/man5/acct.5:152
507 msgid "The I<acct_v3> structure is defined in glibc since version 2.6."
508 msgstr ""
509
510 #. type: Plain text
511 #: build/C/man5/acct.5:156
512 msgid ""
513 "Process accounting originated on BSD.  Although it is present on most "
514 "systems, it is not standardized, and the details vary somewhat between "
515 "systems."
516 msgstr ""
517
518 #. type: Plain text
519 #: build/C/man5/acct.5:159
520 msgid ""
521 "Records in the accounting file are ordered by termination time of the "
522 "process."
523 msgstr ""
524
525 #. type: Plain text
526 #: build/C/man5/acct.5:166
527 msgid ""
528 "In kernels up to and including 2.6.9, a separate accounting record is "
529 "written for each thread created using the NPTL threading library; since "
530 "Linux 2.6.10, a single accounting record is written for the entire process "
531 "on termination of the last thread in the process."
532 msgstr ""
533
534 #. type: Plain text
535 #: build/C/man5/acct.5:173
536 msgid ""
537 "The I<proc/sys/kernel/acct> file, described in B<proc>(5), defines settings "
538 "that control the behavior of process accounting when disk space runs low."
539 msgstr ""
540
541 #. type: Plain text
542 #: build/C/man5/acct.5:178
543 msgid "B<lastcomm>(1), B<acct>(2), B<accton>(8), B<sa>(8)"
544 msgstr ""
545
546 #. type: TH
547 #: build/C/man7/capabilities.7:47
548 #, no-wrap
549 msgid "CAPABILITIES"
550 msgstr ""
551
552 #. type: TH
553 #: build/C/man7/capabilities.7:47
554 #, no-wrap
555 msgid "2011-10-04"
556 msgstr ""
557
558 #. type: Plain text
559 #: build/C/man7/capabilities.7:50
560 msgid "capabilities - overview of Linux capabilities"
561 msgstr ""
562
563 #. type: Plain text
564 #: build/C/man7/capabilities.7:62
565 msgid ""
566 "For the purpose of performing permission checks, traditional UNIX "
567 "implementations distinguish two categories of processes: I<privileged> "
568 "processes (whose effective user ID is 0, referred to as superuser or root), "
569 "and I<unprivileged> processes (whose effective UID is nonzero).  Privileged "
570 "processes bypass all kernel permission checks, while unprivileged processes "
571 "are subject to full permission checking based on the process's credentials "
572 "(usually: effective UID, effective GID, and supplementary group list)."
573 msgstr ""
574
575 #. type: Plain text
576 #: build/C/man7/capabilities.7:69
577 msgid ""
578 "Starting with kernel 2.2, Linux divides the privileges traditionally "
579 "associated with superuser into distinct units, known as I<capabilities>, "
580 "which can be independently enabled and disabled.  Capabilities are a "
581 "per-thread attribute."
582 msgstr ""
583
584 #. type: SS
585 #: build/C/man7/capabilities.7:69
586 #, no-wrap
587 msgid "Capabilities List"
588 msgstr ""
589
590 #. type: Plain text
591 #: build/C/man7/capabilities.7:72
592 msgid ""
593 "The following list shows the capabilities implemented on Linux, and the "
594 "operations or behaviors that each capability permits:"
595 msgstr ""
596
597 #. type: TP
598 #: build/C/man7/capabilities.7:72
599 #, no-wrap
600 msgid "B<CAP_AUDIT_CONTROL> (since Linux 2.6.11)"
601 msgstr ""
602
603 #. type: Plain text
604 #: build/C/man7/capabilities.7:76
605 msgid ""
606 "Enable and disable kernel auditing; change auditing filter rules; retrieve "
607 "auditing status and filtering rules."
608 msgstr ""
609
610 #. type: TP
611 #: build/C/man7/capabilities.7:76
612 #, no-wrap
613 msgid "B<CAP_AUDIT_WRITE> (since Linux 2.6.11)"
614 msgstr ""
615
616 #. type: Plain text
617 #: build/C/man7/capabilities.7:79
618 msgid "Write records to kernel auditing log."
619 msgstr ""
620
621 #. type: TP
622 #: build/C/man7/capabilities.7:79
623 #, no-wrap
624 msgid "B<CAP_CHOWN>"
625 msgstr ""
626
627 #. type: Plain text
628 #: build/C/man7/capabilities.7:83
629 msgid "Make arbitrary changes to file UIDs and GIDs (see B<chown>(2))."
630 msgstr ""
631
632 #. type: TP
633 #: build/C/man7/capabilities.7:83
634 #, no-wrap
635 msgid "B<CAP_DAC_OVERRIDE>"
636 msgstr ""
637
638 #. type: Plain text
639 #: build/C/man7/capabilities.7:87
640 msgid ""
641 "Bypass file read, write, and execute permission checks.  (DAC is an "
642 "abbreviation of \"discretionary access control\".)"
643 msgstr ""
644
645 #. type: TP
646 #: build/C/man7/capabilities.7:87
647 #, no-wrap
648 msgid "B<CAP_DAC_READ_SEARCH>"
649 msgstr ""
650
651 #. type: Plain text
652 #: build/C/man7/capabilities.7:91
653 msgid ""
654 "Bypass file read permission checks and directory read and execute permission "
655 "checks."
656 msgstr ""
657
658 #. type: TP
659 #: build/C/man7/capabilities.7:91
660 #, no-wrap
661 msgid "B<CAP_FOWNER>"
662 msgstr ""
663
664 #. type: IP
665 #: build/C/man7/capabilities.7:95 build/C/man7/capabilities.7:105 build/C/man7/capabilities.7:109 build/C/man7/capabilities.7:111 build/C/man7/capabilities.7:113 build/C/man7/capabilities.7:234 build/C/man7/capabilities.7:244 build/C/man7/capabilities.7:250 build/C/man7/capabilities.7:256 build/C/man7/capabilities.7:263 build/C/man7/capabilities.7:266 build/C/man7/capabilities.7:274 build/C/man7/capabilities.7:276 build/C/man7/capabilities.7:285 build/C/man7/capabilities.7:292 build/C/man7/capabilities.7:295 build/C/man7/capabilities.7:302 build/C/man7/capabilities.7:332 build/C/man7/capabilities.7:337 build/C/man7/capabilities.7:342 build/C/man7/capabilities.7:345 build/C/man7/capabilities.7:348 build/C/man7/capabilities.7:357 build/C/man7/capabilities.7:361 build/C/man7/capabilities.7:393 build/C/man7/capabilities.7:395 build/C/man7/capabilities.7:399 build/C/man7/capabilities.7:401 build/C/man7/capabilities.7:404 build/C/man7/capabilities.7:408 build/C/man7/capabilities.7:417 build/C/man7/capabilities.7:617 build/C/man7/capabilities.7:625 build/C/man7/capabilities.7:932 build/C/man7/capabilities.7:937 build/C/man7/cpuset.7:539 build/C/man7/cpuset.7:544 build/C/man7/cpuset.7:549 build/C/man7/cpuset.7:725 build/C/man7/cpuset.7:729 build/C/man7/cpuset.7:926 build/C/man7/cpuset.7:929 build/C/man7/cpuset.7:933 build/C/man7/cpuset.7:937 build/C/man7/cpuset.7:941 build/C/man7/credentials.7:123 build/C/man7/credentials.7:129 build/C/man7/credentials.7:141 build/C/man7/credentials.7:163 build/C/man7/credentials.7:180 build/C/man7/credentials.7:212 build/C/man7/credentials.7:215 build/C/man7/credentials.7:225 build/C/man7/credentials.7:228
666 #, no-wrap
667 msgid "*"
668 msgstr ""
669
670 #. type: Plain text
671 #: build/C/man7/capabilities.7:105
672 msgid ""
673 "Bypass permission checks on operations that normally require the file system "
674 "UID of the process to match the UID of the file (e.g., B<chmod>(2), "
675 "B<utime>(2)), excluding those operations covered by B<CAP_DAC_OVERRIDE> and "
676 "B<CAP_DAC_READ_SEARCH>;"
677 msgstr ""
678
679 #. type: Plain text
680 #: build/C/man7/capabilities.7:109
681 msgid "set extended file attributes (see B<chattr>(1))  on arbitrary files;"
682 msgstr ""
683
684 #. type: Plain text
685 #: build/C/man7/capabilities.7:111
686 msgid "set Access Control Lists (ACLs) on arbitrary files;"
687 msgstr ""
688
689 #. type: Plain text
690 #: build/C/man7/capabilities.7:113
691 msgid "ignore directory sticky bit on file deletion;"
692 msgstr ""
693
694 #. type: Plain text
695 #: build/C/man7/capabilities.7:120
696 msgid "specify B<O_NOATIME> for arbitrary files in B<open>(2)  and B<fcntl>(2)."
697 msgstr ""
698
699 #. type: TP
700 #: build/C/man7/capabilities.7:122
701 #, no-wrap
702 msgid "B<CAP_FSETID>"
703 msgstr ""
704
705 #. type: Plain text
706 #: build/C/man7/capabilities.7:128
707 msgid ""
708 "Don't clear set-user-ID and set-group-ID permission bits when a file is "
709 "modified; set the set-group-ID bit for a file whose GID does not match the "
710 "file system or any of the supplementary GIDs of the calling process."
711 msgstr ""
712
713 #. type: TP
714 #: build/C/man7/capabilities.7:128
715 #, no-wrap
716 msgid "B<CAP_IPC_LOCK>"
717 msgstr ""
718
719 #. type: Plain text
720 #: build/C/man7/capabilities.7:135
721 msgid "Lock memory (B<mlock>(2), B<mlockall>(2), B<mmap>(2), B<shmctl>(2))."
722 msgstr ""
723
724 #. type: TP
725 #: build/C/man7/capabilities.7:135
726 #, no-wrap
727 msgid "B<CAP_IPC_OWNER>"
728 msgstr ""
729
730 #. type: Plain text
731 #: build/C/man7/capabilities.7:138
732 msgid "Bypass permission checks for operations on System V IPC objects."
733 msgstr ""
734
735 #. type: TP
736 #: build/C/man7/capabilities.7:138
737 #, no-wrap
738 msgid "B<CAP_KILL>"
739 msgstr ""
740
741 #.  FIXME CAP_KILL also has an effect for threads + setting child
742 #.        termination signal to other than SIGCHLD: without this
743 #.        capability, the termination signal reverts to SIGCHLD
744 #.        if the child does an exec().  What is the rationale
745 #.        for this?
746 #. type: Plain text
747 #: build/C/man7/capabilities.7:151
748 msgid ""
749 "Bypass permission checks for sending signals (see B<kill>(2)).  This "
750 "includes use of the B<ioctl>(2)  B<KDSIGACCEPT> operation."
751 msgstr ""
752
753 #. type: TP
754 #: build/C/man7/capabilities.7:151
755 #, no-wrap
756 msgid "B<CAP_LEASE> (since Linux 2.4)"
757 msgstr ""
758
759 #. type: Plain text
760 #: build/C/man7/capabilities.7:155
761 msgid "Establish leases on arbitrary files (see B<fcntl>(2))."
762 msgstr ""
763
764 #. type: TP
765 #: build/C/man7/capabilities.7:155
766 #, no-wrap
767 msgid "B<CAP_LINUX_IMMUTABLE>"
768 msgstr ""
769
770 #.  These attributes are now available on ext2, ext3, Reiserfs, XFS, JFS
771 #. type: Plain text
772 #: build/C/man7/capabilities.7:164
773 msgid ""
774 "Set the B<FS_APPEND_FL> and B<FS_IMMUTABLE_FL> i-node flags (see "
775 "B<chattr>(1))."
776 msgstr ""
777
778 #. type: TP
779 #: build/C/man7/capabilities.7:164
780 #, no-wrap
781 msgid "B<CAP_MAC_ADMIN> (since Linux 2.6.25)"
782 msgstr ""
783
784 #. type: Plain text
785 #: build/C/man7/capabilities.7:168
786 msgid ""
787 "Override Mandatory Access Control (MAC).  Implemented for the Smack Linux "
788 "Security Module (LSM)."
789 msgstr ""
790
791 #. type: TP
792 #: build/C/man7/capabilities.7:168
793 #, no-wrap
794 msgid "B<CAP_MAC_OVERRIDE> (since Linux 2.6.25)"
795 msgstr ""
796
797 #. type: Plain text
798 #: build/C/man7/capabilities.7:172
799 msgid "Allow MAC configuration or state changes.  Implemented for the Smack LSM."
800 msgstr ""
801
802 #. type: TP
803 #: build/C/man7/capabilities.7:172
804 #, no-wrap
805 msgid "B<CAP_MKNOD> (since Linux 2.4)"
806 msgstr ""
807
808 #. type: Plain text
809 #: build/C/man7/capabilities.7:176
810 msgid "Create special files using B<mknod>(2)."
811 msgstr ""
812
813 #. type: TP
814 #: build/C/man7/capabilities.7:176
815 #, no-wrap
816 msgid "B<CAP_NET_ADMIN>"
817 msgstr ""
818
819 #. type: Plain text
820 #: build/C/man7/capabilities.7:182
821 msgid ""
822 "Perform various network-related operations (e.g., setting privileged socket "
823 "options, enabling multicasting, interface configuration, modifying routing "
824 "tables)."
825 msgstr ""
826
827 #. type: TP
828 #: build/C/man7/capabilities.7:182
829 #, no-wrap
830 msgid "B<CAP_NET_BIND_SERVICE>"
831 msgstr ""
832
833 #. type: Plain text
834 #: build/C/man7/capabilities.7:186
835 msgid ""
836 "Bind a socket to Internet domain privileged ports (port numbers less than "
837 "1024)."
838 msgstr ""
839
840 #. type: TP
841 #: build/C/man7/capabilities.7:186
842 #, no-wrap
843 msgid "B<CAP_NET_BROADCAST>"
844 msgstr ""
845
846 #. type: Plain text
847 #: build/C/man7/capabilities.7:189
848 msgid "(Unused)  Make socket broadcasts, and listen to multicasts."
849 msgstr ""
850
851 #. type: TP
852 #: build/C/man7/capabilities.7:189
853 #, no-wrap
854 msgid "B<CAP_NET_RAW>"
855 msgstr ""
856
857 #.  Also various IP options and setsockopt(SO_BINDTODEVICE)
858 #. type: Plain text
859 #: build/C/man7/capabilities.7:193
860 msgid "Use RAW and PACKET sockets."
861 msgstr ""
862
863 #. type: TP
864 #: build/C/man7/capabilities.7:193
865 #, no-wrap
866 msgid "B<CAP_SETGID>"
867 msgstr ""
868
869 #. type: Plain text
870 #: build/C/man7/capabilities.7:197
871 msgid ""
872 "Make arbitrary manipulations of process GIDs and supplementary GID list; "
873 "forge GID when passing socket credentials via UNIX domain sockets."
874 msgstr ""
875
876 #. type: TP
877 #: build/C/man7/capabilities.7:197
878 #, no-wrap
879 msgid "B<CAP_SETFCAP> (since Linux 2.6.24)"
880 msgstr ""
881
882 #. type: Plain text
883 #: build/C/man7/capabilities.7:200
884 msgid "Set file capabilities."
885 msgstr ""
886
887 #. type: TP
888 #: build/C/man7/capabilities.7:200
889 #, no-wrap
890 msgid "B<CAP_SETPCAP>"
891 msgstr ""
892
893 #. type: Plain text
894 #: build/C/man7/capabilities.7:211
895 msgid ""
896 "If file capabilities are not supported: grant or remove any capability in "
897 "the caller's permitted capability set to or from any other process.  (This "
898 "property of B<CAP_SETPCAP> is not available when the kernel is configured to "
899 "support file capabilities, since B<CAP_SETPCAP> has entirely different "
900 "semantics for such kernels.)"
901 msgstr ""
902
903 #. type: Plain text
904 #: build/C/man7/capabilities.7:221
905 msgid ""
906 "If file capabilities are supported: add any capability from the calling "
907 "thread's bounding set to its inheritable set; drop capabilities from the "
908 "bounding set (via B<prctl>(2)  B<PR_CAPBSET_DROP>); make changes to the "
909 "I<securebits> flags."
910 msgstr ""
911
912 #. type: TP
913 #: build/C/man7/capabilities.7:221
914 #, no-wrap
915 msgid "B<CAP_SETUID>"
916 msgstr ""
917
918 #.  FIXME CAP_SETUID also an effect in exec(); document this.
919 #. type: Plain text
920 #: build/C/man7/capabilities.7:230
921 msgid ""
922 "Make arbitrary manipulations of process UIDs (B<setuid>(2), B<setreuid>(2), "
923 "B<setresuid>(2), B<setfsuid>(2)); make forged UID when passing socket "
924 "credentials via UNIX domain sockets."
925 msgstr ""
926
927 #. type: TP
928 #: build/C/man7/capabilities.7:230
929 #, no-wrap
930 msgid "B<CAP_SYS_ADMIN>"
931 msgstr ""
932
933 #. type: Plain text
934 #: build/C/man7/capabilities.7:244
935 msgid ""
936 "Perform a range of system administration operations including: "
937 "B<quotactl>(2), B<mount>(2), B<umount>(2), B<swapon>(2), B<swapoff>(2), "
938 "B<sethostname>(2), and B<setdomainname>(2);"
939 msgstr ""
940
941 #. type: Plain text
942 #: build/C/man7/capabilities.7:250
943 msgid ""
944 "perform privileged B<syslog>(2)  operations (since Linux 2.6.37, "
945 "B<CAP_SYSLOG> should be used to permit such operations);"
946 msgstr ""
947
948 #. type: Plain text
949 #: build/C/man7/capabilities.7:256
950 msgid ""
951 "perform B<IPC_SET> and B<IPC_RMID> operations on arbitrary System V IPC "
952 "objects;"
953 msgstr ""
954
955 #. type: Plain text
956 #: build/C/man7/capabilities.7:263
957 msgid ""
958 "perform operations on I<trusted> and I<security> Extended Attributes (see "
959 "B<attr>(5));"
960 msgstr ""
961
962 #. type: Plain text
963 #: build/C/man7/capabilities.7:266
964 msgid "use B<lookup_dcookie>(2);"
965 msgstr ""
966
967 #. type: Plain text
968 #: build/C/man7/capabilities.7:274
969 msgid ""
970 "use B<ioprio_set>(2)  to assign B<IOPRIO_CLASS_RT> and (before Linux 2.6.25)  "
971 "B<IOPRIO_CLASS_IDLE> I/O scheduling classes;"
972 msgstr ""
973
974 #. type: Plain text
975 #: build/C/man7/capabilities.7:276
976 msgid "forge UID when passing socket credentials;"
977 msgstr ""
978
979 #. type: Plain text
980 #: build/C/man7/capabilities.7:285
981 msgid ""
982 "exceed I</proc/sys/fs/file-max>, the system-wide limit on the number of open "
983 "files, in system calls that open files (e.g., B<accept>(2), B<execve>(2), "
984 "B<open>(2), B<pipe>(2));"
985 msgstr ""
986
987 #. type: Plain text
988 #: build/C/man7/capabilities.7:292
989 msgid "employ B<CLONE_NEWNS> flag with B<clone>(2)  and B<unshare>(2);"
990 msgstr ""
991
992 #. type: Plain text
993 #: build/C/man7/capabilities.7:295
994 msgid "call B<setns>(2);"
995 msgstr ""
996
997 #. type: Plain text
998 #: build/C/man7/capabilities.7:302
999 msgid "perform B<KEYCTL_CHOWN> and B<KEYCTL_SETPERM> B<keyctl>(2)  operations;"
1000 msgstr ""
1001
1002 #. type: Plain text
1003 #: build/C/man7/capabilities.7:307
1004 msgid "perform B<madvise>(2)  B<MADV_HWPOISON> operation."
1005 msgstr ""
1006
1007 #. type: TP
1008 #: build/C/man7/capabilities.7:309
1009 #, no-wrap
1010 msgid "B<CAP_SYS_BOOT>"
1011 msgstr ""
1012
1013 #. type: Plain text
1014 #: build/C/man7/capabilities.7:315
1015 msgid "Use B<reboot>(2)  and B<kexec_load>(2)."
1016 msgstr ""
1017
1018 #. type: TP
1019 #: build/C/man7/capabilities.7:315
1020 #, no-wrap
1021 msgid "B<CAP_SYS_CHROOT>"
1022 msgstr ""
1023
1024 #. type: Plain text
1025 #: build/C/man7/capabilities.7:319
1026 msgid "Use B<chroot>(2)."
1027 msgstr ""
1028
1029 #. type: TP
1030 #: build/C/man7/capabilities.7:319
1031 #, no-wrap
1032 msgid "B<CAP_SYS_MODULE>"
1033 msgstr ""
1034
1035 #. type: Plain text
1036 #: build/C/man7/capabilities.7:328
1037 msgid ""
1038 "Load and unload kernel modules (see B<init_module>(2)  and "
1039 "B<delete_module>(2)); in kernels before 2.6.25: drop capabilities from the "
1040 "system-wide capability bounding set."
1041 msgstr ""
1042
1043 #. type: TP
1044 #: build/C/man7/capabilities.7:328
1045 #, no-wrap
1046 msgid "B<CAP_SYS_NICE>"
1047 msgstr ""
1048
1049 #. type: Plain text
1050 #: build/C/man7/capabilities.7:337
1051 msgid ""
1052 "Raise process nice value (B<nice>(2), B<setpriority>(2))  and change the "
1053 "nice value for arbitrary processes;"
1054 msgstr ""
1055
1056 #. type: Plain text
1057 #: build/C/man7/capabilities.7:342
1058 msgid ""
1059 "set real-time scheduling policies for calling process, and set scheduling "
1060 "policies and priorities for arbitrary processes (B<sched_setscheduler>(2), "
1061 "B<sched_setparam>(2));"
1062 msgstr ""
1063
1064 #. type: Plain text
1065 #: build/C/man7/capabilities.7:345
1066 msgid "set CPU affinity for arbitrary processes (B<sched_setaffinity>(2));"
1067 msgstr ""
1068
1069 #. type: Plain text
1070 #: build/C/man7/capabilities.7:348
1071 msgid ""
1072 "set I/O scheduling class and priority for arbitrary processes "
1073 "(B<ioprio_set>(2));"
1074 msgstr ""
1075
1076 #.  FIXME CAP_SYS_NICE also has the following effect for
1077 #.  migrate_pages(2):
1078 #.      do_migrate_pages(mm, &old, &new,
1079 #.          capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
1080 #. type: Plain text
1081 #: build/C/man7/capabilities.7:357
1082 msgid ""
1083 "apply B<migrate_pages>(2)  to arbitrary processes and allow processes to be "
1084 "migrated to arbitrary nodes;"
1085 msgstr ""
1086
1087 #. type: Plain text
1088 #: build/C/man7/capabilities.7:361
1089 msgid "apply B<move_pages>(2)  to arbitrary processes;"
1090 msgstr ""
1091
1092 #. type: Plain text
1093 #: build/C/man7/capabilities.7:368
1094 msgid "use the B<MPOL_MF_MOVE_ALL> flag with B<mbind>(2)  and B<move_pages>(2)."
1095 msgstr ""
1096
1097 #. type: TP
1098 #: build/C/man7/capabilities.7:370
1099 #, no-wrap
1100 msgid "B<CAP_SYS_PACCT>"
1101 msgstr ""
1102
1103 #. type: Plain text
1104 #: build/C/man7/capabilities.7:374
1105 msgid "Use B<acct>(2)."
1106 msgstr ""
1107
1108 #. type: TP
1109 #: build/C/man7/capabilities.7:374
1110 #, no-wrap
1111 msgid "B<CAP_SYS_PTRACE>"
1112 msgstr ""
1113
1114 #. type: Plain text
1115 #: build/C/man7/capabilities.7:381
1116 msgid ""
1117 "Trace arbitrary processes using B<ptrace>(2); apply B<get_robust_list>(2)  "
1118 "to arbitrary processes."
1119 msgstr ""
1120
1121 #. type: TP
1122 #: build/C/man7/capabilities.7:381
1123 #, no-wrap
1124 msgid "B<CAP_SYS_RAWIO>"
1125 msgstr ""
1126
1127 #. type: Plain text
1128 #: build/C/man7/capabilities.7:389
1129 msgid ""
1130 "Perform I/O port operations (B<iopl>(2)  and B<ioperm>(2)); access "
1131 "I</proc/kcore>."
1132 msgstr ""
1133
1134 #. type: TP
1135 #: build/C/man7/capabilities.7:389
1136 #, no-wrap
1137 msgid "B<CAP_SYS_RESOURCE>"
1138 msgstr ""
1139
1140 #. type: Plain text
1141 #: build/C/man7/capabilities.7:395
1142 msgid "Use reserved space on ext2 file systems;"
1143 msgstr ""
1144
1145 #. type: Plain text
1146 #: build/C/man7/capabilities.7:399
1147 msgid "make B<ioctl>(2)  calls controlling ext3 journaling;"
1148 msgstr ""
1149
1150 #. type: Plain text
1151 #: build/C/man7/capabilities.7:401
1152 msgid "override disk quota limits;"
1153 msgstr ""
1154
1155 #. type: Plain text
1156 #: build/C/man7/capabilities.7:404
1157 msgid "increase resource limits (see B<setrlimit>(2));"
1158 msgstr ""
1159
1160 #. type: Plain text
1161 #: build/C/man7/capabilities.7:408
1162 msgid "override B<RLIMIT_NPROC> resource limit;"
1163 msgstr ""
1164
1165 #. type: Plain text
1166 #: build/C/man7/capabilities.7:417
1167 msgid ""
1168 "raise I<msg_qbytes> limit for a System V message queue above the limit in "
1169 "I</proc/sys/kernel/msgmnb> (see B<msgop>(2)  and B<msgctl>(2))."
1170 msgstr ""
1171
1172 #. type: Plain text
1173 #: build/C/man7/capabilities.7:422
1174 msgid ""
1175 "use B<F_SETPIPE_SZ> to increase the capacity of a pipe above the limit "
1176 "specified by I</proc/sys/fs/pipe-max-size>."
1177 msgstr ""
1178
1179 #. type: TP
1180 #: build/C/man7/capabilities.7:424
1181 #, no-wrap
1182 msgid "B<CAP_SYS_TIME>"
1183 msgstr ""
1184
1185 #. type: Plain text
1186 #: build/C/man7/capabilities.7:431
1187 msgid ""
1188 "Set system clock (B<settimeofday>(2), B<stime>(2), B<adjtimex>(2)); set "
1189 "real-time (hardware) clock."
1190 msgstr ""
1191
1192 #. type: TP
1193 #: build/C/man7/capabilities.7:431
1194 #, no-wrap
1195 msgid "B<CAP_SYS_TTY_CONFIG>"
1196 msgstr ""
1197
1198 #. type: Plain text
1199 #: build/C/man7/capabilities.7:435
1200 msgid "Use B<vhangup>(2)."
1201 msgstr ""
1202
1203 #. type: TP
1204 #: build/C/man7/capabilities.7:435
1205 #, no-wrap
1206 msgid "B<CAP_SYSLOG> (since Linux 2.6.37)"
1207 msgstr ""
1208
1209 #. type: Plain text
1210 #: build/C/man7/capabilities.7:444
1211 msgid ""
1212 "Perform privileged B<syslog>(2)  operations.  See B<syslog>(2)  for "
1213 "information on which operations require privilege."
1214 msgstr ""
1215
1216 #. type: SS
1217 #: build/C/man7/capabilities.7:444
1218 #, no-wrap
1219 msgid "Past and Current Implementation"
1220 msgstr ""
1221
1222 #. type: Plain text
1223 #: build/C/man7/capabilities.7:446
1224 msgid "A full implementation of capabilities requires that:"
1225 msgstr ""
1226
1227 #. type: IP
1228 #: build/C/man7/capabilities.7:446 build/C/man7/capabilities.7:589 build/C/man7/capabilities.7:736 build/C/man7/capabilities.7:789
1229 #, no-wrap
1230 msgid "1."
1231 msgstr ""
1232
1233 #. type: Plain text
1234 #: build/C/man7/capabilities.7:450
1235 msgid ""
1236 "For all privileged operations, the kernel must check whether the thread has "
1237 "the required capability in its effective set."
1238 msgstr ""
1239
1240 #. type: IP
1241 #: build/C/man7/capabilities.7:450 build/C/man7/capabilities.7:594 build/C/man7/capabilities.7:742 build/C/man7/capabilities.7:795
1242 #, no-wrap
1243 msgid "2."
1244 msgstr ""
1245
1246 #. type: Plain text
1247 #: build/C/man7/capabilities.7:453
1248 msgid ""
1249 "The kernel must provide system calls allowing a thread's capability sets to "
1250 "be changed and retrieved."
1251 msgstr ""
1252
1253 #. type: IP
1254 #: build/C/man7/capabilities.7:453 build/C/man7/capabilities.7:745 build/C/man7/capabilities.7:799
1255 #, no-wrap
1256 msgid "3."
1257 msgstr ""
1258
1259 #. type: Plain text
1260 #: build/C/man7/capabilities.7:456
1261 msgid ""
1262 "The file system must support attaching capabilities to an executable file, "
1263 "so that a process gains those capabilities when the file is executed."
1264 msgstr ""
1265
1266 #. type: Plain text
1267 #: build/C/man7/capabilities.7:460
1268 msgid ""
1269 "Before kernel 2.6.24, only the first two of these requirements are met; "
1270 "since kernel 2.6.24, all three requirements are met."
1271 msgstr ""
1272
1273 #. type: SS
1274 #: build/C/man7/capabilities.7:460
1275 #, no-wrap
1276 msgid "Thread Capability Sets"
1277 msgstr ""
1278
1279 #. type: Plain text
1280 #: build/C/man7/capabilities.7:463
1281 msgid ""
1282 "Each thread has three capability sets containing zero or more of the above "
1283 "capabilities:"
1284 msgstr ""
1285
1286 #. type: TP
1287 #: build/C/man7/capabilities.7:463
1288 #, no-wrap
1289 msgid "I<Permitted>:"
1290 msgstr ""
1291
1292 #. type: Plain text
1293 #: build/C/man7/capabilities.7:471
1294 msgid ""
1295 "This is a limiting superset for the effective capabilities that the thread "
1296 "may assume.  It is also a limiting superset for the capabilities that may be "
1297 "added to the inheritable set by a thread that does not have the "
1298 "B<CAP_SETPCAP> capability in its effective set."
1299 msgstr ""
1300
1301 #. type: Plain text
1302 #: build/C/man7/capabilities.7:477
1303 msgid ""
1304 "If a thread drops a capability from its permitted set, it can never "
1305 "reacquire that capability (unless it B<execve>(2)s either a set-user-ID-root "
1306 "program, or a program whose associated file capabilities grant that "
1307 "capability)."
1308 msgstr ""
1309
1310 #. type: TP
1311 #: build/C/man7/capabilities.7:477
1312 #, no-wrap
1313 msgid "I<Inheritable>:"
1314 msgstr ""
1315
1316 #. type: Plain text
1317 #: build/C/man7/capabilities.7:484
1318 msgid ""
1319 "This is a set of capabilities preserved across an B<execve>(2).  It provides "
1320 "a mechanism for a process to assign capabilities to the permitted set of the "
1321 "new program during an B<execve>(2)."
1322 msgstr ""
1323
1324 #. type: TP
1325 #: build/C/man7/capabilities.7:484 build/C/man7/capabilities.7:526
1326 #, no-wrap
1327 msgid "I<Effective>:"
1328 msgstr ""
1329
1330 #. type: Plain text
1331 #: build/C/man7/capabilities.7:488
1332 msgid ""
1333 "This is the set of capabilities used by the kernel to perform permission "
1334 "checks for the thread."
1335 msgstr ""
1336
1337 #. type: Plain text
1338 #: build/C/man7/capabilities.7:494
1339 msgid ""
1340 "A child created via B<fork>(2)  inherits copies of its parent's capability "
1341 "sets.  See below for a discussion of the treatment of capabilities during "
1342 "B<execve>(2)."
1343 msgstr ""
1344
1345 #. type: Plain text
1346 #: build/C/man7/capabilities.7:499
1347 msgid ""
1348 "Using B<capset>(2), a thread may manipulate its own capability sets (see "
1349 "below)."
1350 msgstr ""
1351
1352 #. type: SS
1353 #: build/C/man7/capabilities.7:499
1354 #, no-wrap
1355 msgid "File Capabilities"
1356 msgstr ""
1357
1358 #. type: Plain text
1359 #: build/C/man7/capabilities.7:514
1360 msgid ""
1361 "Since kernel 2.6.24, the kernel supports associating capability sets with an "
1362 "executable file using B<setcap>(8).  The file capability sets are stored in "
1363 "an extended attribute (see B<setxattr>(2))  named I<security.capability>.  "
1364 "Writing to this extended attribute requires the B<CAP_SETFCAP> capability.  "
1365 "The file capability sets, in conjunction with the capability sets of the "
1366 "thread, determine the capabilities of a thread after an B<execve>(2)."
1367 msgstr ""
1368
1369 #. type: Plain text
1370 #: build/C/man7/capabilities.7:516
1371 msgid "The three file capability sets are:"
1372 msgstr ""
1373
1374 #. type: TP
1375 #: build/C/man7/capabilities.7:516
1376 #, no-wrap
1377 msgid "I<Permitted> (formerly known as I<forced>):"
1378 msgstr ""
1379
1380 #. type: Plain text
1381 #: build/C/man7/capabilities.7:520
1382 msgid ""
1383 "These capabilities are automatically permitted to the thread, regardless of "
1384 "the thread's inheritable capabilities."
1385 msgstr ""
1386
1387 #. type: TP
1388 #: build/C/man7/capabilities.7:520
1389 #, no-wrap
1390 msgid "I<Inheritable> (formerly known as I<allowed>):"
1391 msgstr ""
1392
1393 #. type: Plain text
1394 #: build/C/man7/capabilities.7:526
1395 msgid ""
1396 "This set is ANDed with the thread's inheritable set to determine which "
1397 "inheritable capabilities are enabled in the permitted set of the thread "
1398 "after the B<execve>(2)."
1399 msgstr ""
1400
1401 #. type: Plain text
1402 #: build/C/man7/capabilities.7:536
1403 msgid ""
1404 "This is not a set, but rather just a single bit.  If this bit is set, then "
1405 "during an B<execve>(2)  all of the new permitted capabilities for the thread "
1406 "are also raised in the effective set.  If this bit is not set, then after an "
1407 "B<execve>(2), none of the new permitted capabilities is in the new effective "
1408 "set."
1409 msgstr ""
1410
1411 #. type: Plain text
1412 #: build/C/man7/capabilities.7:552
1413 msgid ""
1414 "Enabling the file effective capability bit implies that any file permitted "
1415 "or inheritable capability that causes a thread to acquire the corresponding "
1416 "permitted capability during an B<execve>(2)  (see the transformation rules "
1417 "described below) will also acquire that capability in its effective set.  "
1418 "Therefore, when assigning capabilities to a file (B<setcap>(8), "
1419 "B<cap_set_file>(3), B<cap_set_fd>(3)), if we specify the effective flag as "
1420 "being enabled for any capability, then the effective flag must also be "
1421 "specified as enabled for all other capabilities for which the corresponding "
1422 "permitted or inheritable flags is enabled."
1423 msgstr ""
1424
1425 #. type: SS
1426 #: build/C/man7/capabilities.7:552
1427 #, no-wrap
1428 msgid "Transformation of Capabilities During execve()"
1429 msgstr ""
1430
1431 #. type: Plain text
1432 #: build/C/man7/capabilities.7:558
1433 msgid ""
1434 "During an B<execve>(2), the kernel calculates the new capabilities of the "
1435 "process using the following algorithm:"
1436 msgstr ""
1437
1438 #. type: Plain text
1439 #: build/C/man7/capabilities.7:563
1440 #, no-wrap
1441 msgid ""
1442 "P'(permitted) = (P(inheritable) & F(inheritable)) |\n"
1443 "                (F(permitted) & cap_bset)\n"
1444 msgstr ""
1445
1446 #. type: Plain text
1447 #: build/C/man7/capabilities.7:565
1448 #, no-wrap
1449 msgid "P'(effective) = F(effective) ? P'(permitted) : 0\n"
1450 msgstr ""
1451
1452 #. type: Plain text
1453 #: build/C/man7/capabilities.7:567
1454 #, no-wrap
1455 msgid "P'(inheritable) = P(inheritable)    [i.e., unchanged]\n"
1456 msgstr ""
1457
1458 #. type: Plain text
1459 #: build/C/man7/capabilities.7:571
1460 msgid "where:"
1461 msgstr ""
1462
1463 #. type: IP
1464 #: build/C/man7/capabilities.7:572
1465 #, no-wrap
1466 msgid "P"
1467 msgstr ""
1468
1469 #. type: Plain text
1470 #: build/C/man7/capabilities.7:575
1471 msgid "denotes the value of a thread capability set before the B<execve>(2)"
1472 msgstr ""
1473
1474 #. type: IP
1475 #: build/C/man7/capabilities.7:575
1476 #, no-wrap
1477 msgid "P'"
1478 msgstr ""
1479
1480 #. type: Plain text
1481 #: build/C/man7/capabilities.7:578
1482 msgid "denotes the value of a capability set after the B<execve>(2)"
1483 msgstr ""
1484
1485 #. type: IP
1486 #: build/C/man7/capabilities.7:578
1487 #, no-wrap
1488 msgid "F"
1489 msgstr ""
1490
1491 #. type: Plain text
1492 #: build/C/man7/capabilities.7:580
1493 msgid "denotes a file capability set"
1494 msgstr ""
1495
1496 #. type: IP
1497 #: build/C/man7/capabilities.7:580
1498 #, no-wrap
1499 msgid "cap_bset"
1500 msgstr ""
1501
1502 #. type: Plain text
1503 #: build/C/man7/capabilities.7:582
1504 msgid "is the value of the capability bounding set (described below)."
1505 msgstr ""
1506
1507 #. type: SS
1508 #: build/C/man7/capabilities.7:584
1509 #, no-wrap
1510 msgid "Capabilities and execution of programs by root"
1511 msgstr ""
1512
1513 #. type: Plain text
1514 #: build/C/man7/capabilities.7:589
1515 msgid ""
1516 "In order to provide an all-powerful I<root> using capability sets, during an "
1517 "B<execve>(2):"
1518 msgstr ""
1519
1520 #. type: Plain text
1521 #: build/C/man7/capabilities.7:594
1522 msgid ""
1523 "If a set-user-ID-root program is being executed, or the real user ID of the "
1524 "process is 0 (root)  then the file inheritable and permitted sets are "
1525 "defined to be all ones (i.e., all capabilities enabled)."
1526 msgstr ""
1527
1528 #. type: Plain text
1529 #: build/C/man7/capabilities.7:597
1530 msgid ""
1531 "If a set-user-ID-root program is being executed, then the file effective bit "
1532 "is defined to be one (enabled)."
1533 msgstr ""
1534
1535 #.  If a process with real UID 0, and nonzero effective UID does an
1536 #.  exec(), then it gets all capabilities in its
1537 #.  permitted set, and no effective capabilities
1538 #. type: Plain text
1539 #: build/C/man7/capabilities.7:612
1540 msgid ""
1541 "The upshot of the above rules, combined with the capabilities "
1542 "transformations described above, is that when a process B<execve>(2)s a "
1543 "set-user-ID-root program, or when a process with an effective UID of 0 "
1544 "B<execve>(2)s a program, it gains all capabilities in its permitted and "
1545 "effective capability sets, except those masked out by the capability "
1546 "bounding set.  This provides semantics that are the same as those provided "
1547 "by traditional UNIX systems."
1548 msgstr ""
1549
1550 #. type: SS
1551 #: build/C/man7/capabilities.7:612
1552 #, no-wrap
1553 msgid "Capability bounding set"
1554 msgstr ""
1555
1556 #. type: Plain text
1557 #: build/C/man7/capabilities.7:617
1558 msgid ""
1559 "The capability bounding set is a security mechanism that can be used to "
1560 "limit the capabilities that can be gained during an B<execve>(2).  The "
1561 "bounding set is used in the following ways:"
1562 msgstr ""
1563
1564 #. type: Plain text
1565 #: build/C/man7/capabilities.7:625
1566 msgid ""
1567 "During an B<execve>(2), the capability bounding set is ANDed with the file "
1568 "permitted capability set, and the result of this operation is assigned to "
1569 "the thread's permitted capability set.  The capability bounding set thus "
1570 "places a limit on the permitted capabilities that may be granted by an "
1571 "executable file."
1572 msgstr ""
1573
1574 #. type: Plain text
1575 #: build/C/man7/capabilities.7:637
1576 msgid ""
1577 "(Since Linux 2.6.25)  The capability bounding set acts as a limiting "
1578 "superset for the capabilities that a thread can add to its inheritable set "
1579 "using B<capset>(2).  This means that if a capability is not in the bounding "
1580 "set, then a thread can't add this capability to its inheritable set, even if "
1581 "it was in its permitted capabilities, and thereby cannot have this "
1582 "capability preserved in its permitted set when it B<execve>(2)s a file that "
1583 "has the capability in its inheritable set."
1584 msgstr ""
1585
1586 #. type: Plain text
1587 #: build/C/man7/capabilities.7:644
1588 msgid ""
1589 "Note that the bounding set masks the file permitted capabilities, but not "
1590 "the inherited capabilities.  If a thread maintains a capability in its "
1591 "inherited set that is not in its bounding set, then it can still gain that "
1592 "capability in its permitted set by executing a file that has the capability "
1593 "in its inherited set."
1594 msgstr ""
1595
1596 #. type: Plain text
1597 #: build/C/man7/capabilities.7:647
1598 msgid ""
1599 "Depending on the kernel version, the capability bounding set is either a "
1600 "system-wide attribute, or a per-process attribute."
1601 msgstr ""
1602
1603 #. type: Plain text
1604 #: build/C/man7/capabilities.7:649
1605 msgid "B<Capability bounding set prior to Linux 2.6.25>"
1606 msgstr ""
1607
1608 #. type: Plain text
1609 #: build/C/man7/capabilities.7:657
1610 msgid ""
1611 "In kernels before 2.6.25, the capability bounding set is a system-wide "
1612 "attribute that affects all threads on the system.  The bounding set is "
1613 "accessible via the file I</proc/sys/kernel/cap-bound>.  (Confusingly, this "
1614 "bit mask parameter is expressed as a signed decimal number in "
1615 "I</proc/sys/kernel/cap-bound>.)"
1616 msgstr ""
1617
1618 #. type: Plain text
1619 #: build/C/man7/capabilities.7:664
1620 msgid ""
1621 "Only the B<init> process may set capabilities in the capability bounding "
1622 "set; other than that, the superuser (more precisely: programs with the "
1623 "B<CAP_SYS_MODULE> capability) may only clear capabilities from this set."
1624 msgstr ""
1625
1626 #. type: Plain text
1627 #: build/C/man7/capabilities.7:673
1628 msgid ""
1629 "On a standard system the capability bounding set always masks out the "
1630 "B<CAP_SETPCAP> capability.  To remove this restriction (dangerous!), modify "
1631 "the definition of B<CAP_INIT_EFF_SET> in I<include/linux/capability.h> and "
1632 "rebuild the kernel."
1633 msgstr ""
1634
1635 #. type: Plain text
1636 #: build/C/man7/capabilities.7:677
1637 msgid ""
1638 "The system-wide capability bounding set feature was added to Linux starting "
1639 "with kernel version 2.2.11."
1640 msgstr ""
1641
1642 #. type: Plain text
1643 #: build/C/man7/capabilities.7:679
1644 msgid "B<Capability bounding set from Linux 2.6.25 onward>"
1645 msgstr ""
1646
1647 #. type: Plain text
1648 #: build/C/man7/capabilities.7:684
1649 msgid ""
1650 "From Linux 2.6.25, the I<capability bounding set> is a per-thread "
1651 "attribute.  (There is no longer a system-wide capability bounding set.)"
1652 msgstr ""
1653
1654 #. type: Plain text
1655 #: build/C/man7/capabilities.7:689
1656 msgid ""
1657 "The bounding set is inherited at B<fork>(2)  from the thread's parent, and "
1658 "is preserved across an B<execve>(2)."
1659 msgstr ""
1660
1661 #. type: Plain text
1662 #: build/C/man7/capabilities.7:702
1663 msgid ""
1664 "A thread may remove capabilities from its capability bounding set using the "
1665 "B<prctl>(2)  B<PR_CAPBSET_DROP> operation, provided it has the "
1666 "B<CAP_SETPCAP> capability.  Once a capability has been dropped from the "
1667 "bounding set, it cannot be restored to that set.  A thread can determine if "
1668 "a capability is in its bounding set using the B<prctl>(2)  "
1669 "B<PR_CAPBSET_READ> operation."
1670 msgstr ""
1671
1672 #. type: Plain text
1673 #: build/C/man7/capabilities.7:720
1674 msgid ""
1675 "Removing capabilities from the bounding set is only supported if file "
1676 "capabilities are compiled into the kernel.  In kernels before Linux 2.6.33, "
1677 "file capabilities were an optional feature configurable via the "
1678 "CONFIG_SECURITY_FILE_CAPABILITIES option.  Since Linux 2.6.33, the "
1679 "configuration option has been removed and file capabilities are always part "
1680 "of the kernel.  When file capabilities are compiled into the kernel, the "
1681 "B<init> process (the ancestor of all processes) begins with a full bounding "
1682 "set.  If file capabilities are not compiled into the kernel, then B<init> "
1683 "begins with a full bounding set minus B<CAP_SETPCAP>, because this "
1684 "capability has a different meaning when there are no file capabilities."
1685 msgstr ""
1686
1687 #. type: Plain text
1688 #: build/C/man7/capabilities.7:727
1689 msgid ""
1690 "Removing a capability from the bounding set does not remove it from the "
1691 "thread's inherited set.  However it does prevent the capability from being "
1692 "added back into the thread's inherited set in the future."
1693 msgstr ""
1694
1695 #. type: SS
1696 #: build/C/man7/capabilities.7:727
1697 #, no-wrap
1698 msgid "Effect of User ID Changes on Capabilities"
1699 msgstr ""
1700
1701 #. type: Plain text
1702 #: build/C/man7/capabilities.7:736
1703 msgid ""
1704 "To preserve the traditional semantics for transitions between 0 and nonzero "
1705 "user IDs, the kernel makes the following changes to a thread's capability "
1706 "sets on changes to the thread's real, effective, saved set, and file system "
1707 "user IDs (using B<setuid>(2), B<setresuid>(2), or similar):"
1708 msgstr ""
1709
1710 #. type: Plain text
1711 #: build/C/man7/capabilities.7:742
1712 msgid ""
1713 "If one or more of the real, effective or saved set user IDs was previously "
1714 "0, and as a result of the UID changes all of these IDs have a nonzero value, "
1715 "then all capabilities are cleared from the permitted and effective "
1716 "capability sets."
1717 msgstr ""
1718
1719 #. type: Plain text
1720 #: build/C/man7/capabilities.7:745
1721 msgid ""
1722 "If the effective user ID is changed from 0 to nonzero, then all capabilities "
1723 "are cleared from the effective set."
1724 msgstr ""
1725
1726 #. type: Plain text
1727 #: build/C/man7/capabilities.7:748
1728 msgid ""
1729 "If the effective user ID is changed from nonzero to 0, then the permitted "
1730 "set is copied to the effective set."
1731 msgstr ""
1732
1733 #. type: IP
1734 #: build/C/man7/capabilities.7:748 build/C/man7/capabilities.7:803
1735 #, no-wrap
1736 msgid "4."
1737 msgstr ""
1738
1739 #. type: Plain text
1740 #: build/C/man7/capabilities.7:766
1741 msgid ""
1742 "If the file system user ID is changed from 0 to nonzero (see B<setfsuid>(2))  "
1743 "then the following capabilities are cleared from the effective set: "
1744 "B<CAP_CHOWN>, B<CAP_DAC_OVERRIDE>, B<CAP_DAC_READ_SEARCH>, B<CAP_FOWNER>, "
1745 "B<CAP_FSETID>, B<CAP_LINUX_IMMUTABLE> (since Linux 2.2.30), "
1746 "B<CAP_MAC_OVERRIDE>, and B<CAP_MKNOD> (since Linux 2.2.30).  If the file "
1747 "system UID is changed from nonzero to 0, then any of these capabilities that "
1748 "are enabled in the permitted set are enabled in the effective set."
1749 msgstr ""
1750
1751 #. type: Plain text
1752 #: build/C/man7/capabilities.7:774
1753 msgid ""
1754 "If a thread that has a 0 value for one or more of its user IDs wants to "
1755 "prevent its permitted capability set being cleared when it resets all of its "
1756 "user IDs to nonzero values, it can do so using the B<prctl>(2)  "
1757 "B<PR_SET_KEEPCAPS> operation."
1758 msgstr ""
1759
1760 #. type: SS
1761 #: build/C/man7/capabilities.7:774
1762 #, no-wrap
1763 msgid "Programmatically adjusting capability sets"
1764 msgstr ""
1765
1766 #. type: Plain text
1767 #: build/C/man7/capabilities.7:789
1768 msgid ""
1769 "A thread can retrieve and change its capability sets using the B<capget>(2)  "
1770 "and B<capset>(2)  system calls.  However, the use of B<cap_get_proc>(3)  and "
1771 "B<cap_set_proc>(3), both provided in the I<libcap> package, is preferred for "
1772 "this purpose.  The following rules govern changes to the thread capability "
1773 "sets:"
1774 msgstr ""
1775
1776 #. type: Plain text
1777 #: build/C/man7/capabilities.7:795
1778 msgid ""
1779 "If the caller does not have the B<CAP_SETPCAP> capability, the new "
1780 "inheritable set must be a subset of the combination of the existing "
1781 "inheritable and permitted sets."
1782 msgstr ""
1783
1784 #. type: Plain text
1785 #: build/C/man7/capabilities.7:799
1786 msgid ""
1787 "(Since kernel 2.6.25)  The new inheritable set must be a subset of the "
1788 "combination of the existing inheritable set and the capability bounding set."
1789 msgstr ""
1790
1791 #. type: Plain text
1792 #: build/C/man7/capabilities.7:803
1793 msgid ""
1794 "The new permitted set must be a subset of the existing permitted set (i.e., "
1795 "it is not possible to acquire permitted capabilities that the thread does "
1796 "not currently have)."
1797 msgstr ""
1798
1799 #. type: Plain text
1800 #: build/C/man7/capabilities.7:805
1801 msgid "The new effective set must be a subset of the new permitted set."
1802 msgstr ""
1803
1804 #. type: SS
1805 #: build/C/man7/capabilities.7:805
1806 #, no-wrap
1807 msgid "The \"securebits\" flags: establishing a capabilities-only environment"
1808 msgstr ""
1809
1810 #.  For some background:
1811 #.        see http://lwn.net/Articles/280279/ and
1812 #.        http://article.gmane.org/gmane.linux.kernel.lsm/5476/
1813 #. type: Plain text
1814 #: build/C/man7/capabilities.7:816
1815 msgid ""
1816 "Starting with kernel 2.6.26, and with a kernel in which file capabilities "
1817 "are enabled, Linux implements a set of per-thread I<securebits> flags that "
1818 "can be used to disable special handling of capabilities for UID 0 "
1819 "(I<root>).  These flags are as follows:"
1820 msgstr ""
1821
1822 #. type: TP
1823 #: build/C/man7/capabilities.7:816
1824 #, no-wrap
1825 msgid "B<SECBIT_KEEP_CAPS>"
1826 msgstr ""
1827
1828 #. type: Plain text
1829 #: build/C/man7/capabilities.7:828
1830 msgid ""
1831 "Setting this flag allows a thread that has one or more 0 UIDs to retain its "
1832 "capabilities when it switches all of its UIDs to a nonzero value.  If this "
1833 "flag is not set, then such a UID switch causes the thread to lose all "
1834 "capabilities.  This flag is always cleared on an B<execve>(2).  (This flag "
1835 "provides the same functionality as the older B<prctl>(2)  B<PR_SET_KEEPCAPS> "
1836 "operation.)"
1837 msgstr ""
1838
1839 #. type: TP
1840 #: build/C/man7/capabilities.7:828
1841 #, no-wrap
1842 msgid "B<SECBIT_NO_SETUID_FIXUP>"
1843 msgstr ""
1844
1845 #. type: Plain text
1846 #: build/C/man7/capabilities.7:835
1847 msgid ""
1848 "Setting this flag stops the kernel from adjusting capability sets when the "
1849 "threads's effective and file system UIDs are switched between zero and "
1850 "nonzero values.  (See the subsection I<Effect of User ID Changes on "
1851 "Capabilities>.)"
1852 msgstr ""
1853
1854 #. type: TP
1855 #: build/C/man7/capabilities.7:835
1856 #, no-wrap
1857 msgid "B<SECBIT_NOROOT>"
1858 msgstr ""
1859
1860 #. type: Plain text
1861 #: build/C/man7/capabilities.7:843
1862 msgid ""
1863 "If this bit is set, then the kernel does not grant capabilities when a "
1864 "set-user-ID-root program is executed, or when a process with an effective or "
1865 "real UID of 0 calls B<execve>(2).  (See the subsection I<Capabilities and "
1866 "execution of programs by root>.)"
1867 msgstr ""
1868
1869 #. type: Plain text
1870 #: build/C/man7/capabilities.7:853
1871 msgid ""
1872 "Each of the above \"base\" flags has a companion \"locked\" flag.  Setting "
1873 "any of the \"locked\" flags is irreversible, and has the effect of "
1874 "preventing further changes to the corresponding \"base\" flag.  The locked "
1875 "flags are: B<SECBIT_KEEP_CAPS_LOCKED>, B<SECBIT_NO_SETUID_FIXUP_LOCKED>, and "
1876 "B<SECBIT_NOROOT_LOCKED>."
1877 msgstr ""
1878
1879 #. type: Plain text
1880 #: build/C/man7/capabilities.7:865
1881 msgid ""
1882 "The I<securebits> flags can be modified and retrieved using the B<prctl>(2)  "
1883 "B<PR_SET_SECUREBITS> and B<PR_GET_SECUREBITS> operations.  The "
1884 "B<CAP_SETPCAP> capability is required to modify the flags."
1885 msgstr ""
1886
1887 #. type: Plain text
1888 #: build/C/man7/capabilities.7:874
1889 msgid ""
1890 "The I<securebits> flags are inherited by child processes.  During an "
1891 "B<execve>(2), all of the flags are preserved, except B<SECBIT_KEEP_CAPS> "
1892 "which is always cleared."
1893 msgstr ""
1894
1895 #. type: Plain text
1896 #: build/C/man7/capabilities.7:879
1897 msgid ""
1898 "An application can use the following call to lock itself, and all of its "
1899 "descendants, into an environment where the only way of gaining capabilities "
1900 "is by executing a program with associated file capabilities:"
1901 msgstr ""
1902
1903 #. type: Plain text
1904 #: build/C/man7/capabilities.7:888
1905 #, no-wrap
1906 msgid ""
1907 "prctl(PR_SET_SECUREBITS,\n"
1908 "        SECBIT_KEEP_CAPS_LOCKED |\n"
1909 "        SECBIT_NO_SETUID_FIXUP |\n"
1910 "        SECBIT_NO_SETUID_FIXUP_LOCKED |\n"
1911 "        SECBIT_NOROOT |\n"
1912 "        SECBIT_NOROOT_LOCKED);\n"
1913 msgstr ""
1914
1915 #. type: Plain text
1916 #: build/C/man7/capabilities.7:895
1917 msgid ""
1918 "No standards govern capabilities, but the Linux capability implementation is "
1919 "based on the withdrawn POSIX.1e draft standard; see "
1920 "I<http://wt.xpilot.org/publications/posix.1e/>."
1921 msgstr ""
1922
1923 #. type: Plain text
1924 #: build/C/man7/capabilities.7:899
1925 msgid ""
1926 "Since kernel 2.5.27, capabilities are an optional kernel component, and can "
1927 "be enabled/disabled via the CONFIG_SECURITY_CAPABILITIES kernel "
1928 "configuration option."
1929 msgstr ""
1930
1931 #. type: Plain text
1932 #: build/C/man7/capabilities.7:906
1933 msgid ""
1934 "The I</proc/PID/task/TID/status> file can be used to view the capability "
1935 "sets of a thread.  The I</proc/PID/status> file shows the capability sets of "
1936 "a process's main thread."
1937 msgstr ""
1938
1939 #. type: Plain text
1940 #: build/C/man7/capabilities.7:921
1941 msgid ""
1942 "The I<libcap> package provides a suite of routines for setting and getting "
1943 "capabilities that is more comfortable and less likely to change than the "
1944 "interface provided by B<capset>(2)  and B<capget>(2).  This package also "
1945 "provides the B<setcap>(8)  and B<getcap>(8)  programs.  It can be found at"
1946 msgstr ""
1947
1948 #. type: Plain text
1949 #: build/C/man7/capabilities.7:923
1950 msgid "I<http://www.kernel.org/pub/linux/libs/security/linux-privs>."
1951 msgstr ""
1952
1953 #. type: Plain text
1954 #: build/C/man7/capabilities.7:932
1955 msgid ""
1956 "Before kernel 2.6.24, and since kernel 2.6.24 if file capabilities are not "
1957 "enabled, a thread with the B<CAP_SETPCAP> capability can manipulate the "
1958 "capabilities of threads other than itself.  However, this is only "
1959 "theoretically possible, since no thread ever has B<CAP_SETPCAP> in either of "
1960 "these cases:"
1961 msgstr ""
1962
1963 #. type: Plain text
1964 #: build/C/man7/capabilities.7:937
1965 msgid ""
1966 "In the pre-2.6.25 implementation the system-wide capability bounding set, "
1967 "I</proc/sys/kernel/cap-bound>, always masks out this capability, and this "
1968 "can not be changed without modifying the kernel source and rebuilding."
1969 msgstr ""
1970
1971 #. type: Plain text
1972 #: build/C/man7/capabilities.7:943
1973 msgid ""
1974 "If file capabilities are disabled in the current implementation, then "
1975 "B<init> starts out with this capability removed from its per-process "
1976 "bounding set, and that bounding set is inherited by all other processes "
1977 "created on the system."
1978 msgstr ""
1979
1980 #. type: Plain text
1981 #: build/C/man7/capabilities.7:959
1982 msgid ""
1983 "B<capget>(2), B<prctl>(2), B<setfsuid>(2), B<cap_clear>(3), "
1984 "B<cap_copy_ext>(3), B<cap_from_text>(3), B<cap_get_file>(3), "
1985 "B<cap_get_proc>(3), B<cap_init>(3), B<capgetp>(3), B<capsetp>(3), "
1986 "B<credentials>(7), B<pthreads>(7), B<getcap>(8), B<setcap>(8)"
1987 msgstr ""
1988
1989 #. type: Plain text
1990 #: build/C/man7/capabilities.7:962
1991 msgid "I<include/linux/capability.h> in the kernel source"
1992 msgstr ""
1993
1994 #. type: TH
1995 #: build/C/man2/capget.2:11
1996 #, no-wrap
1997 msgid "CAPGET"
1998 msgstr ""
1999
2000 #. type: TH
2001 #: build/C/man2/capget.2:11
2002 #, no-wrap
2003 msgid "2010-09-20"
2004 msgstr ""
2005
2006 #. type: Plain text
2007 #: build/C/man2/capget.2:14
2008 msgid "capget, capset - set/get capabilities of thread(s)"
2009 msgstr ""
2010
2011 #. type: Plain text
2012 #: build/C/man2/capget.2:16
2013 msgid "B<#include E<lt>sys/capability.hE<gt>>"
2014 msgstr ""
2015
2016 #. type: Plain text
2017 #: build/C/man2/capget.2:18
2018 msgid "B<int capget(cap_user_header_t >I<hdrp>B<, cap_user_data_t >I<datap>B<);>"
2019 msgstr ""
2020
2021 #. type: Plain text
2022 #: build/C/man2/capget.2:20
2023 msgid ""
2024 "B<int capset(cap_user_header_t >I<hdrp>B<, const cap_user_data_t "
2025 ">I<datap>B<);>"
2026 msgstr ""
2027
2028 #. type: Plain text
2029 #: build/C/man2/capget.2:31
2030 msgid ""
2031 "As of Linux 2.2, the power of the superuser (root) has been partitioned into "
2032 "a set of discrete capabilities.  Each thread has a set of effective "
2033 "capabilities identifying which capabilities (if any) it may currently "
2034 "exercise.  Each thread also has a set of inheritable capabilities that may "
2035 "be passed through an B<execve>(2)  call, and a set of permitted capabilities "
2036 "that it can make effective or inheritable."
2037 msgstr ""
2038
2039 #. type: Plain text
2040 #: build/C/man2/capget.2:40
2041 msgid ""
2042 "These two functions are the raw kernel interface for getting and setting "
2043 "thread capabilities.  Not only are these system calls specific to Linux, but "
2044 "the kernel API is likely to change and use of these functions (in particular "
2045 "the format of the I<cap_user_*_t> types) is subject to extension with each "
2046 "kernel revision, but old programs will keep working."
2047 msgstr ""
2048
2049 #. type: Plain text
2050 #: build/C/man2/capget.2:51
2051 msgid ""
2052 "The portable interfaces are B<cap_set_proc>(3)  and B<cap_get_proc>(3); if "
2053 "possible you should use those interfaces in applications.  If you wish to "
2054 "use the Linux extensions in applications, you should use the easier-to-use "
2055 "interfaces B<capsetp>(3)  and B<capgetp>(3)."
2056 msgstr ""
2057
2058 #. type: SS
2059 #: build/C/man2/capget.2:51
2060 #, no-wrap
2061 msgid "Current details"
2062 msgstr ""
2063
2064 #. type: Plain text
2065 #: build/C/man2/capget.2:54
2066 msgid ""
2067 "Now that you have been warned, some current kernel details.  The structures "
2068 "are defined as follows."
2069 msgstr ""
2070
2071 #. type: Plain text
2072 #: build/C/man2/capget.2:59
2073 #, no-wrap
2074 msgid ""
2075 "#define _LINUX_CAPABILITY_VERSION_1  0x19980330\n"
2076 "#define _LINUX_CAPABILITY_U32S_1     1\n"
2077 msgstr ""
2078
2079 #. type: Plain text
2080 #: build/C/man2/capget.2:62
2081 #, no-wrap
2082 msgid ""
2083 "#define _LINUX_CAPABILITY_VERSION_2  0x20071026\n"
2084 "#define _LINUX_CAPABILITY_U32S_2     2\n"
2085 msgstr ""
2086
2087 #. type: Plain text
2088 #: build/C/man2/capget.2:67
2089 #, no-wrap
2090 msgid ""
2091 "typedef struct __user_cap_header_struct {\n"
2092 "   __u32 version;\n"
2093 "   int pid;\n"
2094 "} *cap_user_header_t;\n"
2095 msgstr ""
2096
2097 #. type: Plain text
2098 #: build/C/man2/capget.2:73
2099 #, no-wrap
2100 msgid ""
2101 "typedef struct __user_cap_data_struct {\n"
2102 "   __u32 effective;\n"
2103 "   __u32 permitted;\n"
2104 "   __u32 inheritable;\n"
2105 "} *cap_user_data_t;\n"
2106 msgstr ""
2107
2108 #. type: Plain text
2109 #: build/C/man2/capget.2:88
2110 msgid ""
2111 "I<effective, permitted, inheritable> are bitmasks of the capabilities "
2112 "defined in I<capability(7).> Note the I<CAP_*> values are bit indexes and "
2113 "need to be bit-shifted before ORing into the bit fields.  To define the "
2114 "structures for passing to the system call you have to use the I<struct "
2115 "__user_cap_header_struct> and I<struct __user_cap_data_struct> names because "
2116 "the typedefs are only pointers."
2117 msgstr ""
2118
2119 #. type: Plain text
2120 #: build/C/man2/capget.2:100
2121 msgid ""
2122 "Kernels prior to 2.6.25 prefer 32-bit capabilities with version "
2123 "B<_LINUX_CAPABILITY_VERSION_1>, and kernels 2.6.25+ prefer 64-bit "
2124 "capabilities with version B<_LINUX_CAPABILITY_VERSION_2>.  Note, 64-bit "
2125 "capabilities use I<datap>[0] and I<datap>[1], whereas 32-bit capabilities "
2126 "use only I<datap>[0]."
2127 msgstr ""
2128
2129 #. type: Plain text
2130 #: build/C/man2/capget.2:104
2131 msgid ""
2132 "Another change affecting the behavior of these system calls is kernel "
2133 "support for file capabilities (VFS capability support).  This support is "
2134 "currently a compile time option (added in kernel 2.6.24)."
2135 msgstr ""
2136
2137 #. type: Plain text
2138 #: build/C/man2/capget.2:111
2139 msgid ""
2140 "For B<capget>()  calls, one can probe the capabilities of any process by "
2141 "specifying its process ID with the I<hdrp-E<gt>pid> field value."
2142 msgstr ""
2143
2144 #. type: SS
2145 #: build/C/man2/capget.2:111
2146 #, no-wrap
2147 msgid "With VFS Capability Support"
2148 msgstr ""
2149
2150 #. type: Plain text
2151 #: build/C/man2/capget.2:123
2152 msgid ""
2153 "VFS Capability support creates a file-attribute method for adding "
2154 "capabilities to privileged executables.  This privilege model obsoletes "
2155 "kernel support for one process asynchronously setting the capabilities of "
2156 "another.  That is, with VFS support, for B<capset>()  calls the only "
2157 "permitted values for I<hdrp-E<gt>pid> are 0 or B<getpid>(2), which are "
2158 "equivalent."
2159 msgstr ""
2160
2161 #. type: SS
2162 #: build/C/man2/capget.2:123
2163 #, no-wrap
2164 msgid "Without VFS Capability Support"
2165 msgstr ""
2166
2167 #. type: Plain text
2168 #: build/C/man2/capget.2:149
2169 msgid ""
2170 "When the kernel does not support VFS capabilities, B<capset>()  calls can "
2171 "operate on the capabilities of the thread specified by the I<pid> field of "
2172 "I<hdrp> when that is nonzero, or on the capabilities of the calling thread "
2173 "if I<pid> is 0.  If I<pid> refers to a single-threaded process, then I<pid> "
2174 "can be specified as a traditional process ID; operating on a thread of a "
2175 "multithreaded process requires a thread ID of the type returned by "
2176 "B<gettid>(2).  For B<capset>(), I<pid> can also be: -1, meaning perform the "
2177 "change on all threads except the caller and B<init>(8); or a value less than "
2178 "-1, in which case the change is applied to all members of the process group "
2179 "whose ID is -I<pid>."
2180 msgstr ""
2181
2182 #. type: Plain text
2183 #: build/C/man2/capget.2:152
2184 msgid "For details on the data, see B<capabilities>(7)."
2185 msgstr ""
2186
2187 #. type: Plain text
2188 #: build/C/man2/capget.2:171
2189 msgid ""
2190 "The calls will fail with the error B<EINVAL>, and set the I<version> field "
2191 "of I<hdrp> to the kernel preferred value of B<_LINUX_CAPABILITY_VERSION_?> "
2192 "when an unsupported I<version> value is specified.  In this way, one can "
2193 "probe what the current preferred capability revision is."
2194 msgstr ""
2195
2196 #. type: Plain text
2197 #: build/C/man2/capget.2:180
2198 msgid ""
2199 "Bad memory address.  I<hdrp> must not be NULL.  I<datap> may be NULL only "
2200 "when the user is trying to determine the preferred capability version format "
2201 "supported by the kernel."
2202 msgstr ""
2203
2204 #. type: TP
2205 #: build/C/man2/capget.2:180 build/C/man7/cpuset.7:1179 build/C/man7/cpuset.7:1188 build/C/man7/cpuset.7:1197 build/C/man7/cpuset.7:1207 build/C/man7/cpuset.7:1216 build/C/man7/cpuset.7:1223 build/C/man7/cpuset.7:1230 build/C/man2/getgroups.2:114 build/C/man2/getgroups.2:121 build/C/man2/getpriority.2:119 build/C/man2/getrlimit.2:440 build/C/man2/getrusage.2:190 build/C/man2/iopl.2:71 build/C/man2/ioprio_set.2:160 build/C/man2/setpgid.2:200
2206 #, no-wrap
2207 msgid "B<EINVAL>"
2208 msgstr ""
2209
2210 #. type: Plain text
2211 #: build/C/man2/capget.2:183
2212 msgid "One of the arguments was invalid."
2213 msgstr ""
2214
2215 #. type: Plain text
2216 #: build/C/man2/capget.2:188
2217 msgid ""
2218 "An attempt was made to add a capability to the Permitted set, or to set a "
2219 "capability in the Effective or Inheritable sets that is not in the Permitted "
2220 "set."
2221 msgstr ""
2222
2223 #. type: Plain text
2224 #: build/C/man2/capget.2:207
2225 msgid ""
2226 "The caller attempted to use B<capset>()  to modify the capabilities of a "
2227 "thread other than itself, but lacked sufficient privilege.  For kernels "
2228 "supporting VFS capabilities, this is never permitted.  For kernels lacking "
2229 "VFS support, the B<CAP_SETPCAP> capability is required.  (A bug in kernels "
2230 "before 2.6.11 meant that this error could also occur if a thread without "
2231 "this capability tried to change its own capabilities by specifying the "
2232 "I<pid> field as a nonzero value (i.e., the value returned by B<getpid>(2))  "
2233 "instead of 0.)"
2234 msgstr ""
2235
2236 #. type: TP
2237 #: build/C/man2/capget.2:207 build/C/man7/cpuset.7:1329 build/C/man2/getpriority.2:127 build/C/man2/getrlimit.2:464 build/C/man2/getsid.2:69 build/C/man2/ioprio_set.2:177 build/C/man2/setpgid.2:215
2238 #, no-wrap
2239 msgid "B<ESRCH>"
2240 msgstr ""
2241
2242 #. type: Plain text
2243 #: build/C/man2/capget.2:210
2244 msgid "No such thread."
2245 msgstr ""
2246
2247 #. type: Plain text
2248 #: build/C/man2/capget.2:212 build/C/man2/ioprio_set.2:188
2249 msgid "These system calls are Linux-specific."
2250 msgstr ""
2251
2252 #. type: Plain text
2253 #: build/C/man2/capget.2:217
2254 msgid ""
2255 "The portable interface to the capability querying and setting functions is "
2256 "provided by the I<libcap> library and is available here:"
2257 msgstr ""
2258
2259 #. type: Plain text
2260 #: build/C/man2/capget.2:219
2261 msgid "http://www.kernel.org/pub/linux/libs/security/linux-privs"
2262 msgstr ""
2263
2264 #. type: Plain text
2265 #: build/C/man2/capget.2:223
2266 msgid "B<clone>(2), B<gettid>(2), B<capabilities>(7)"
2267 msgstr ""
2268
2269 #. type: TH
2270 #: build/C/man7/cpuset.7:24
2271 #, no-wrap
2272 msgid "CPUSET"
2273 msgstr ""
2274
2275 #. type: TH
2276 #: build/C/man7/cpuset.7:24
2277 #, no-wrap
2278 msgid "2008-11-12"
2279 msgstr ""
2280
2281 #. type: Plain text
2282 #: build/C/man7/cpuset.7:27
2283 msgid "cpuset - confine processes to processor and memory node subsets"
2284 msgstr ""
2285
2286 #. type: Plain text
2287 #: build/C/man7/cpuset.7:34
2288 msgid ""
2289 "The cpuset file system is a pseudo-file-system interface to the kernel "
2290 "cpuset mechanism, which is used to control the processor placement and "
2291 "memory placement of processes.  It is commonly mounted at I</dev/cpuset>."
2292 msgstr ""
2293
2294 #. type: Plain text
2295 #: build/C/man7/cpuset.7:51
2296 msgid ""
2297 "On systems with kernels compiled with built in support for cpusets, all "
2298 "processes are attached to a cpuset, and cpusets are always present.  If a "
2299 "system supports cpusets, then it will have the entry B<nodev cpuset> in the "
2300 "file I</proc/filesystems>.  By mounting the cpuset file system (see the "
2301 "B<EXAMPLE> section below), the administrator can configure the cpusets on a "
2302 "system to control the processor and memory placement of processes on that "
2303 "system.  By default, if the cpuset configuration on a system is not modified "
2304 "or if the cpuset file system is not even mounted, then the cpuset mechanism, "
2305 "though present, has no affect on the system's behavior."
2306 msgstr ""
2307
2308 #. type: Plain text
2309 #: build/C/man7/cpuset.7:53
2310 msgid "A cpuset defines a list of CPUs and memory nodes."
2311 msgstr ""
2312
2313 #. type: Plain text
2314 #: build/C/man7/cpuset.7:62
2315 msgid ""
2316 "The CPUs of a system include all the logical processing units on which a "
2317 "process can execute, including, if present, multiple processor cores within "
2318 "a package and Hyper-Threads within a processor core.  Memory nodes include "
2319 "all distinct banks of main memory; small and SMP systems typically have just "
2320 "one memory node that contains all the system's main memory, while NUMA "
2321 "(non-uniform memory access) systems have multiple memory nodes."
2322 msgstr ""
2323
2324 #. type: Plain text
2325 #: build/C/man7/cpuset.7:72
2326 msgid ""
2327 "Cpusets are represented as directories in a hierarchical pseudo-file system, "
2328 "where the top directory in the hierarchy (I</dev/cpuset>)  represents the "
2329 "entire system (all online CPUs and memory nodes)  and any cpuset that is the "
2330 "child (descendant) of another parent cpuset contains a subset of that "
2331 "parent's CPUs and memory nodes.  The directories and files representing "
2332 "cpusets have normal file-system permissions."
2333 msgstr ""
2334
2335 #. type: Plain text
2336 #: build/C/man7/cpuset.7:83
2337 msgid ""
2338 "Every process in the system belongs to exactly one cpuset.  A process is "
2339 "confined to only run on the CPUs in the cpuset it belongs to, and to "
2340 "allocate memory only on the memory nodes in that cpuset.  When a process "
2341 "B<fork>(2)s, the child process is placed in the same cpuset as its parent.  "
2342 "With sufficient privilege, a process may be moved from one cpuset to another "
2343 "and the allowed CPUs and memory nodes of an existing cpuset may be changed."
2344 msgstr ""
2345
2346 #. type: Plain text
2347 #: build/C/man7/cpuset.7:91
2348 msgid ""
2349 "When the system begins booting, a single cpuset is defined that includes all "
2350 "CPUs and memory nodes on the system, and all processes are in that cpuset.  "
2351 "During the boot process, or later during normal system operation, other "
2352 "cpusets may be created, as subdirectories of this top cpuset, under the "
2353 "control of the system administrator, and processes may be placed in these "
2354 "other cpusets."
2355 msgstr ""
2356
2357 #. type: Plain text
2358 #: build/C/man7/cpuset.7:113
2359 msgid ""
2360 "Cpusets are integrated with the B<sched_setaffinity>(2)  scheduling affinity "
2361 "mechanism and the B<mbind>(2)  and B<set_mempolicy>(2)  memory-placement "
2362 "mechanisms in the kernel.  Neither of these mechanisms let a process make "
2363 "use of a CPU or memory node that is not allowed by that process's cpuset.  "
2364 "If changes to a process's cpuset placement conflict with these other "
2365 "mechanisms, then cpuset placement is enforced even if it means overriding "
2366 "these other mechanisms.  The kernel accomplishes this overriding by silently "
2367 "restricting the CPUs and memory nodes requested by these other mechanisms to "
2368 "those allowed by the invoking process's cpuset.  This can result in these "
2369 "other calls returning an error, if for example, such a call ends up "
2370 "requesting an empty set of CPUs or memory nodes, after that request is "
2371 "restricted to the invoking process's cpuset."
2372 msgstr ""
2373
2374 #. type: Plain text
2375 #: build/C/man7/cpuset.7:119
2376 msgid ""
2377 "Typically, a cpuset is used to manage the CPU and memory-node confinement "
2378 "for a set of cooperating processes such as a batch scheduler job, and these "
2379 "other mechanisms are used to manage the placement of individual processes or "
2380 "memory regions within that set or job."
2381 msgstr ""
2382
2383 #. type: SH
2384 #: build/C/man7/cpuset.7:119
2385 #, no-wrap
2386 msgid "FILES"
2387 msgstr ""
2388
2389 #. type: Plain text
2390 #: build/C/man7/cpuset.7:124
2391 msgid ""
2392 "Each directory below I</dev/cpuset> represents a cpuset and contains a fixed "
2393 "set of pseudo-files describing the state of that cpuset."
2394 msgstr ""
2395
2396 #. type: Plain text
2397 #: build/C/man7/cpuset.7:134
2398 msgid ""
2399 "New cpusets are created using the B<mkdir>(2)  system call or the "
2400 "B<mkdir>(1)  command.  The properties of a cpuset, such as its flags, "
2401 "allowed CPUs and memory nodes, and attached processes, are queried and "
2402 "modified by reading or writing to the appropriate file in that cpuset's "
2403 "directory, as listed below."
2404 msgstr ""
2405
2406 #. type: Plain text
2407 #: build/C/man7/cpuset.7:140
2408 msgid ""
2409 "The pseudo-files in each cpuset directory are automatically created when the "
2410 "cpuset is created, as a result of the B<mkdir>(2)  invocation.  It is not "
2411 "possible to directly add or remove these pseudo-files."
2412 msgstr ""
2413
2414 #. type: Plain text
2415 #: build/C/man7/cpuset.7:148
2416 msgid ""
2417 "A cpuset directory that contains no child cpuset directories, and has no "
2418 "attached processes, can be removed using B<rmdir>(2)  or B<rmdir>(1).  It is "
2419 "not necessary, or possible, to remove the pseudo-files inside the directory "
2420 "before removing it."
2421 msgstr ""
2422
2423 #. type: Plain text
2424 #: build/C/man7/cpuset.7:162
2425 msgid ""
2426 "The pseudo-files in each cpuset directory are small text files that may be "
2427 "read and written using traditional shell utilities such as B<cat>(1), and "
2428 "B<echo>(1), or from a program by using file I/O library functions or system "
2429 "calls, such as B<open>(2), B<read>(2), B<write>(2), and B<close>(2)."
2430 msgstr ""
2431
2432 #.  ====================== tasks ======================
2433 #. type: Plain text
2434 #: build/C/man7/cpuset.7:167
2435 msgid ""
2436 "The pseudo-files in a cpuset directory represent internal kernel state and "
2437 "do not have any persistent image on disk.  Each of these per-cpuset files is "
2438 "listed and described below."
2439 msgstr ""
2440
2441 #. type: TP
2442 #: build/C/man7/cpuset.7:167
2443 #, no-wrap
2444 msgid "I<tasks>"
2445 msgstr ""
2446
2447 #. type: Plain text
2448 #: build/C/man7/cpuset.7:177
2449 msgid ""
2450 "List of the process IDs (PIDs) of the processes in that cpuset.  The list is "
2451 "formatted as a series of ASCII decimal numbers, each followed by a newline.  "
2452 "A process may be added to a cpuset (automatically removing it from the "
2453 "cpuset that previously contained it) by writing its PID to that cpuset's "
2454 "I<tasks> file (with or without a trailing newline.)"
2455 msgstr ""
2456
2457 #.  =================== notify_on_release ===================
2458 #. type: Plain text
2459 #: build/C/man7/cpuset.7:185
2460 msgid ""
2461 "B<Warning:> only one PID may be written to the I<tasks> file at a time.  If "
2462 "a string is written that contains more than one PID, only the first one will "
2463 "be used."
2464 msgstr ""
2465
2466 #. type: TP
2467 #: build/C/man7/cpuset.7:185
2468 #, no-wrap
2469 msgid "I<notify_on_release>"
2470 msgstr ""
2471
2472 #.  ====================== cpus ======================
2473 #. type: Plain text
2474 #: build/C/man7/cpuset.7:194
2475 msgid ""
2476 "Flag (0 or 1).  If set (1), that cpuset will receive special handling after "
2477 "it is released, that is, after all processes cease using it (i.e., terminate "
2478 "or are moved to a different cpuset)  and all child cpuset directories have "
2479 "been removed.  See the B<Notify On Release> section, below."
2480 msgstr ""
2481
2482 #. type: TP
2483 #: build/C/man7/cpuset.7:194
2484 #, no-wrap
2485 msgid "I<cpus>"
2486 msgstr ""
2487
2488 #. type: Plain text
2489 #: build/C/man7/cpuset.7:201
2490 msgid ""
2491 "List of the physical numbers of the CPUs on which processes in that cpuset "
2492 "are allowed to execute.  See B<List Format> below for a description of the "
2493 "format of I<cpus>."
2494 msgstr ""
2495
2496 #.  ==================== cpu_exclusive ====================
2497 #. type: Plain text
2498 #: build/C/man7/cpuset.7:207
2499 msgid ""
2500 "The CPUs allowed to a cpuset may be changed by writing a new list to its "
2501 "I<cpus> file."
2502 msgstr ""
2503
2504 #. type: TP
2505 #: build/C/man7/cpuset.7:207
2506 #, no-wrap
2507 msgid "I<cpu_exclusive>"
2508 msgstr ""
2509
2510 #. type: Plain text
2511 #: build/C/man7/cpuset.7:214
2512 msgid ""
2513 "Flag (0 or 1).  If set (1), the cpuset has exclusive use of its CPUs (no "
2514 "sibling or cousin cpuset may overlap CPUs).  By default this is off (0).  "
2515 "Newly created cpusets also initially default this to off (0)."
2516 msgstr ""
2517
2518 #.  ====================== mems ======================
2519 #. type: Plain text
2520 #: build/C/man7/cpuset.7:236
2521 msgid ""
2522 "Two cpusets are I<sibling> cpusets if they share the same parent cpuset in "
2523 "the I</dev/cpuset> hierarchy.  Two cpusets are I<cousin> cpusets if neither "
2524 "is the ancestor of the other.  Regardless of the I<cpu_exclusive> setting, "
2525 "if one cpuset is the ancestor of another, and if both of these cpusets have "
2526 "nonempty I<cpus>, then their I<cpus> must overlap, because the I<cpus> of "
2527 "any cpuset are always a subset of the I<cpus> of its parent cpuset."
2528 msgstr ""
2529
2530 #. type: TP
2531 #: build/C/man7/cpuset.7:236
2532 #, no-wrap
2533 msgid "I<mems>"
2534 msgstr ""
2535
2536 #.  ==================== mem_exclusive ====================
2537 #. type: Plain text
2538 #: build/C/man7/cpuset.7:244
2539 msgid ""
2540 "List of memory nodes on which processes in this cpuset are allowed to "
2541 "allocate memory.  See B<List Format> below for a description of the format "
2542 "of I<mems>."
2543 msgstr ""
2544
2545 #. type: TP
2546 #: build/C/man7/cpuset.7:244
2547 #, no-wrap
2548 msgid "I<mem_exclusive>"
2549 msgstr ""
2550
2551 #. type: Plain text
2552 #: build/C/man7/cpuset.7:252
2553 msgid ""
2554 "Flag (0 or 1).  If set (1), the cpuset has exclusive use of its memory nodes "
2555 "(no sibling or cousin may overlap).  Also if set (1), the cpuset is a "
2556 "B<Hardwall> cpuset (see below.)  By default this is off (0).  Newly created "
2557 "cpusets also initially default this to off (0)."
2558 msgstr ""
2559
2560 #.  ==================== mem_hardwall ====================
2561 #. type: Plain text
2562 #: build/C/man7/cpuset.7:260
2563 msgid ""
2564 "Regardless of the I<mem_exclusive> setting, if one cpuset is the ancestor of "
2565 "another, then their memory nodes must overlap, because the memory nodes of "
2566 "any cpuset are always a subset of the memory nodes of that cpuset's parent "
2567 "cpuset."
2568 msgstr ""
2569
2570 #. type: TP
2571 #: build/C/man7/cpuset.7:260
2572 #, no-wrap
2573 msgid "I<mem_hardwall> (since Linux 2.6.26)"
2574 msgstr ""
2575
2576 #.  ==================== memory_migrate ====================
2577 #. type: Plain text
2578 #: build/C/man7/cpuset.7:271
2579 msgid ""
2580 "Flag (0 or 1).  If set (1), the cpuset is a B<Hardwall> cpuset (see below.)  "
2581 "Unlike B<mem_exclusive>, there is no constraint on whether cpusets marked "
2582 "B<mem_hardwall> may have overlapping memory nodes with sibling or cousin "
2583 "cpusets.  By default this is off (0).  Newly created cpusets also initially "
2584 "default this to off (0)."
2585 msgstr ""
2586
2587 #. type: TP
2588 #: build/C/man7/cpuset.7:271
2589 #, no-wrap
2590 msgid "I<memory_migrate> (since Linux 2.6.16)"
2591 msgstr ""
2592
2593 #.  ==================== memory_pressure ====================
2594 #. type: Plain text
2595 #: build/C/man7/cpuset.7:278
2596 msgid ""
2597 "Flag (0 or 1).  If set (1), then memory migration is enabled.  By default "
2598 "this is off (0).  See the B<Memory Migration> section, below."
2599 msgstr ""
2600
2601 #. type: TP
2602 #: build/C/man7/cpuset.7:278
2603 #, no-wrap
2604 msgid "I<memory_pressure> (since Linux 2.6.16)"
2605 msgstr ""
2606
2607 #.  ================= memory_pressure_enabled =================
2608 #. type: Plain text
2609 #: build/C/man7/cpuset.7:291
2610 msgid ""
2611 "A measure of how much memory pressure the processes in this cpuset are "
2612 "causing.  See the B<Memory Pressure> section, below.  Unless "
2613 "I<memory_pressure_enabled> is enabled, always has value zero (0).  This file "
2614 "is read-only.  See the B<WARNINGS> section, below."
2615 msgstr ""
2616
2617 #. type: TP
2618 #: build/C/man7/cpuset.7:291
2619 #, no-wrap
2620 msgid "I<memory_pressure_enabled> (since Linux 2.6.16)"
2621 msgstr ""
2622
2623 #.  ================== memory_spread_page ==================
2624 #. type: Plain text
2625 #: build/C/man7/cpuset.7:303
2626 msgid ""
2627 "Flag (0 or 1).  This file is only present in the root cpuset, normally "
2628 "I</dev/cpuset>.  If set (1), the I<memory_pressure> calculations are enabled "
2629 "for all cpusets in the system.  By default this is off (0).  See the "
2630 "B<Memory Pressure> section, below."
2631 msgstr ""
2632
2633 #. type: TP
2634 #: build/C/man7/cpuset.7:303
2635 #, no-wrap
2636 msgid "I<memory_spread_page> (since Linux 2.6.17)"
2637 msgstr ""
2638
2639 #.  ================== memory_spread_slab ==================
2640 #. type: Plain text
2641 #: build/C/man7/cpuset.7:313
2642 msgid ""
2643 "Flag (0 or 1).  If set (1), pages in the kernel page cache (file-system "
2644 "buffers) are uniformly spread across the cpuset.  By default this is off (0) "
2645 "in the top cpuset, and inherited from the parent cpuset in newly created "
2646 "cpusets.  See the B<Memory Spread> section, below."
2647 msgstr ""
2648
2649 #. type: TP
2650 #: build/C/man7/cpuset.7:313
2651 #, no-wrap
2652 msgid "I<memory_spread_slab> (since Linux 2.6.17)"
2653 msgstr ""
2654
2655 #.  ================== sched_load_balance ==================
2656 #. type: Plain text
2657 #: build/C/man7/cpuset.7:324
2658 msgid ""
2659 "Flag (0 or 1).  If set (1), the kernel slab caches for file I/O (directory "
2660 "and inode structures) are uniformly spread across the cpuset.  By default "
2661 "this is off (0) in the top cpuset, and inherited from the parent cpuset in "
2662 "newly created cpusets.  See the B<Memory Spread> section, below."
2663 msgstr ""
2664
2665 #. type: TP
2666 #: build/C/man7/cpuset.7:324
2667 #, no-wrap
2668 msgid "I<sched_load_balance> (since Linux 2.6.24)"
2669 msgstr ""
2670
2671 #.  ================== sched_relax_domain_level ==================
2672 #. type: Plain text
2673 #: build/C/man7/cpuset.7:338
2674 msgid ""
2675 "Flag (0 or 1).  If set (1, the default) the kernel will automatically load "
2676 "balance processes in that cpuset over the allowed CPUs in that cpuset.  If "
2677 "cleared (0) the kernel will avoid load balancing processes in this cpuset, "
2678 "I<unless> some other cpuset with overlapping CPUs has its "
2679 "I<sched_load_balance> flag set.  See B<Scheduler Load Balancing>, below, for "
2680 "further details."
2681 msgstr ""
2682
2683 #. type: TP
2684 #: build/C/man7/cpuset.7:338
2685 #, no-wrap
2686 msgid "I<sched_relax_domain_level> (since Linux 2.6.26)"
2687 msgstr ""
2688
2689 #.  ================== proc cpuset ==================
2690 #. type: Plain text
2691 #: build/C/man7/cpuset.7:358
2692 msgid ""
2693 "Integer, between -1 and a small positive value.  The "
2694 "I<sched_relax_domain_level> controls the width of the range of CPUs over "
2695 "which the kernel scheduler performs immediate rebalancing of runnable tasks "
2696 "across CPUs.  If I<sched_load_balance> is disabled, then the setting of "
2697 "I<sched_relax_domain_level> does not matter, as no such load balancing is "
2698 "done.  If I<sched_load_balance> is enabled, then the higher the value of the "
2699 "I<sched_relax_domain_level>, the wider the range of CPUs over which "
2700 "immediate load balancing is attempted.  See B<Scheduler Relax Domain Level>, "
2701 "below, for further details."
2702 msgstr ""
2703
2704 #.  ================== proc status ==================
2705 #. type: Plain text
2706 #: build/C/man7/cpuset.7:366
2707 msgid ""
2708 "In addition to the above pseudo-files in each directory below "
2709 "I</dev/cpuset>, each process has a pseudo-file, "
2710 "I</proc/E<lt>pidE<gt>/cpuset>, that displays the path of the process's "
2711 "cpuset directory relative to the root of the cpuset file system."
2712 msgstr ""
2713
2714 #. type: Plain text
2715 #: build/C/man7/cpuset.7:377
2716 msgid ""
2717 "Also the I</proc/E<lt>pidE<gt>/status> file for each process has four added "
2718 "lines, displaying the process's I<Cpus_allowed> (on which CPUs it may be "
2719 "scheduled) and I<Mems_allowed> (on which memory nodes it may obtain memory), "
2720 "in the two formats B<Mask Format> and B<List Format> (see below)  as shown "
2721 "in the following example:"
2722 msgstr ""
2723
2724 #. type: Plain text
2725 #: build/C/man7/cpuset.7:384
2726 #, no-wrap
2727 msgid ""
2728 "Cpus_allowed:   ffffffff,ffffffff,ffffffff,ffffffff\n"
2729 "Cpus_allowed_list:     0-127\n"
2730 "Mems_allowed:   ffffffff,ffffffff\n"
2731 "Mems_allowed_list:     0-63\n"
2732 msgstr ""
2733
2734 #.  ================== EXTENDED CAPABILITIES ==================
2735 #. type: Plain text
2736 #: build/C/man7/cpuset.7:390
2737 msgid ""
2738 "The \"allowed\" fields were added in Linux 2.6.24; the \"allowed_list\" "
2739 "fields were added in Linux 2.6.26."
2740 msgstr ""
2741
2742 #. type: SH
2743 #: build/C/man7/cpuset.7:390
2744 #, no-wrap
2745 msgid "EXTENDED CAPABILITIES"
2746 msgstr ""
2747
2748 #.  ================== Exclusive Cpusets ==================
2749 #. type: Plain text
2750 #: build/C/man7/cpuset.7:398
2751 msgid ""
2752 "In addition to controlling which I<cpus> and I<mems> a process is allowed to "
2753 "use, cpusets provide the following extended capabilities."
2754 msgstr ""
2755
2756 #. type: SS
2757 #: build/C/man7/cpuset.7:398
2758 #, no-wrap
2759 msgid "Exclusive Cpusets"
2760 msgstr ""
2761
2762 #. type: Plain text
2763 #: build/C/man7/cpuset.7:405
2764 msgid ""
2765 "If a cpuset is marked I<cpu_exclusive> or I<mem_exclusive>, no other cpuset, "
2766 "other than a direct ancestor or descendant, may share any of the same CPUs "
2767 "or memory nodes."
2768 msgstr ""
2769
2770 #.  ================== Hardwall ==================
2771 #. type: Plain text
2772 #: build/C/man7/cpuset.7:431
2773 msgid ""
2774 "A cpuset that is I<mem_exclusive> restricts kernel allocations for buffer "
2775 "cache pages and other internal kernel data pages commonly shared by the "
2776 "kernel across multiple users.  All cpusets, whether I<mem_exclusive> or not, "
2777 "restrict allocations of memory for user space.  This enables configuring a "
2778 "system so that several independent jobs can share common kernel data, while "
2779 "isolating each job's user allocation in its own cpuset.  To do this, "
2780 "construct a large I<mem_exclusive> cpuset to hold all the jobs, and "
2781 "construct child, non-I<mem_exclusive> cpusets for each individual job.  Only "
2782 "a small amount of kernel memory, such as requests from interrupt handlers, "
2783 "is allowed to be placed on memory nodes outside even a I<mem_exclusive> "
2784 "cpuset."
2785 msgstr ""
2786
2787 #. type: SS
2788 #: build/C/man7/cpuset.7:431
2789 #, no-wrap
2790 msgid "Hardwall"
2791 msgstr ""
2792
2793 #. type: Plain text
2794 #: build/C/man7/cpuset.7:446
2795 msgid ""
2796 "A cpuset that has I<mem_exclusive> or I<mem_hardwall> set is a I<hardwall> "
2797 "cpuset.  A I<hardwall> cpuset restricts kernel allocations for page, buffer, "
2798 "and other data commonly shared by the kernel across multiple users.  All "
2799 "cpusets, whether I<hardwall> or not, restrict allocations of memory for user "
2800 "space."
2801 msgstr ""
2802
2803 #. type: Plain text
2804 #: build/C/man7/cpuset.7:457
2805 msgid ""
2806 "This enables configuring a system so that several independent jobs can share "
2807 "common kernel data, such as file system pages, while isolating each job's "
2808 "user allocation in its own cpuset.  To do this, construct a large "
2809 "I<hardwall> cpuset to hold all the jobs, and construct child cpusets for "
2810 "each individual job which are not I<hardwall> cpusets."
2811 msgstr ""
2812
2813 #.  ================== Notify On Release ==================
2814 #. type: Plain text
2815 #: build/C/man7/cpuset.7:463
2816 msgid ""
2817 "Only a small amount of kernel memory, such as requests from interrupt "
2818 "handlers, is allowed to be taken outside even a I<hardwall> cpuset."
2819 msgstr ""
2820
2821 #. type: SS
2822 #: build/C/man7/cpuset.7:463
2823 #, no-wrap
2824 msgid "Notify On Release"
2825 msgstr ""
2826
2827 #. type: Plain text
2828 #: build/C/man7/cpuset.7:475
2829 msgid ""
2830 "If the I<notify_on_release> flag is enabled (1) in a cpuset, then whenever "
2831 "the last process in the cpuset leaves (exits or attaches to some other "
2832 "cpuset)  and the last child cpuset of that cpuset is removed, the kernel "
2833 "will run the command I</sbin/cpuset_release_agent>, supplying the pathname "
2834 "(relative to the mount point of the cpuset file system) of the abandoned "
2835 "cpuset.  This enables automatic removal of abandoned cpusets."
2836 msgstr ""
2837
2838 #. type: Plain text
2839 #: build/C/man7/cpuset.7:483
2840 msgid ""
2841 "The default value of I<notify_on_release> in the root cpuset at system boot "
2842 "is disabled (0).  The default value of other cpusets at creation is the "
2843 "current value of their parent's I<notify_on_release> setting."
2844 msgstr ""
2845
2846 #. type: Plain text
2847 #: build/C/man7/cpuset.7:491
2848 msgid ""
2849 "The command I</sbin/cpuset_release_agent> is invoked, with the name "
2850 "(I</dev/cpuset> relative path)  of the to-be-released cpuset in I<argv[1]>."
2851 msgstr ""
2852
2853 #. type: Plain text
2854 #: build/C/man7/cpuset.7:495
2855 msgid ""
2856 "The usual contents of the command I</sbin/cpuset_release_agent> is simply "
2857 "the shell script:"
2858 msgstr ""
2859
2860 #. type: Plain text
2861 #: build/C/man7/cpuset.7:500
2862 #, no-wrap
2863 msgid ""
2864 "#!/bin/sh\n"
2865 "rmdir /dev/cpuset/$1\n"
2866 msgstr ""
2867
2868 #.  ================== Memory Pressure ==================
2869 #. type: Plain text
2870 #: build/C/man7/cpuset.7:508
2871 msgid ""
2872 "As with other flag values below, this flag can be changed by writing an "
2873 "ASCII number 0 or 1 (with optional trailing newline)  into the file, to "
2874 "clear or set the flag, respectively."
2875 msgstr ""
2876
2877 #. type: SS
2878 #: build/C/man7/cpuset.7:508
2879 #, no-wrap
2880 msgid "Memory Pressure"
2881 msgstr ""
2882
2883 #. type: Plain text
2884 #: build/C/man7/cpuset.7:514
2885 msgid ""
2886 "The I<memory_pressure> of a cpuset provides a simple per-cpuset running "
2887 "average of the rate that the processes in a cpuset are attempting to free up "
2888 "in-use memory on the nodes of the cpuset to satisfy additional memory "
2889 "requests."
2890 msgstr ""
2891
2892 #. type: Plain text
2893 #: build/C/man7/cpuset.7:518
2894 msgid ""
2895 "This enables batch managers that are monitoring jobs running in dedicated "
2896 "cpusets to efficiently detect what level of memory pressure that job is "
2897 "causing."
2898 msgstr ""
2899
2900 #. type: Plain text
2901 #: build/C/man7/cpuset.7:525
2902 msgid ""
2903 "This is useful both on tightly managed systems running a wide mix of "
2904 "submitted jobs, which may choose to terminate or reprioritize jobs that are "
2905 "trying to use more memory than allowed on the nodes assigned them, and with "
2906 "tightly coupled, long-running, massively parallel scientific computing jobs "
2907 "that will dramatically fail to meet required performance goals if they start "
2908 "to use more memory than allowed to them."
2909 msgstr ""
2910
2911 #. type: Plain text
2912 #: build/C/man7/cpuset.7:530
2913 msgid ""
2914 "This mechanism provides a very economical way for the batch manager to "
2915 "monitor a cpuset for signs of memory pressure.  It's up to the batch manager "
2916 "or other user code to decide what action to take if it detects signs of "
2917 "memory pressure."
2918 msgstr ""
2919
2920 #. type: Plain text
2921 #: build/C/man7/cpuset.7:537
2922 msgid ""
2923 "Unless memory pressure calculation is enabled by setting the pseudo-file "
2924 "I</dev/cpuset/memory_pressure_enabled>, it is not computed for any cpuset, "
2925 "and reads from any I<memory_pressure> always return zero, as represented by "
2926 "the ASCII string \"0\\en\".  See the B<WARNINGS> section, below."
2927 msgstr ""
2928
2929 #. type: Plain text
2930 #: build/C/man7/cpuset.7:539
2931 msgid "A per-cpuset, running average is employed for the following reasons:"
2932 msgstr ""
2933
2934 #. type: Plain text
2935 #: build/C/man7/cpuset.7:544
2936 msgid ""
2937 "Because this meter is per-cpuset rather than per-process or per virtual "
2938 "memory region, the system load imposed by a batch scheduler monitoring this "
2939 "metric is sharply reduced on large systems, because a scan of the tasklist "
2940 "can be avoided on each set of queries."
2941 msgstr ""
2942
2943 #. type: Plain text
2944 #: build/C/man7/cpuset.7:549
2945 msgid ""
2946 "Because this meter is a running average rather than an accumulating counter, "
2947 "a batch scheduler can detect memory pressure with a single read, instead of "
2948 "having to read and accumulate results for a period of time."
2949 msgstr ""
2950
2951 #. type: Plain text
2952 #: build/C/man7/cpuset.7:555
2953 msgid ""
2954 "Because this meter is per-cpuset rather than per-process, the batch "
2955 "scheduler can obtain the key information\\(emmemory pressure in a "
2956 "cpuset\\(emwith a single read, rather than having to query and accumulate "
2957 "results over all the (dynamically changing)  set of processes in the cpuset."
2958 msgstr ""
2959
2960 #. type: Plain text
2961 #: build/C/man7/cpuset.7:563
2962 msgid ""
2963 "The I<memory_pressure> of a cpuset is calculated using a per-cpuset simple "
2964 "digital filter that is kept within the kernel.  For each cpuset, this filter "
2965 "tracks the recent rate at which processes attached to that cpuset enter the "
2966 "kernel direct reclaim code."
2967 msgstr ""
2968
2969 #. type: Plain text
2970 #: build/C/man7/cpuset.7:572
2971 msgid ""
2972 "The kernel direct reclaim code is entered whenever a process has to satisfy "
2973 "a memory page request by first finding some other page to repurpose, due to "
2974 "lack of any readily available already free pages.  Dirty file system pages "
2975 "are repurposed by first writing them to disk.  Unmodified file system buffer "
2976 "pages are repurposed by simply dropping them, though if that page is needed "
2977 "again, it will have to be reread from disk."
2978 msgstr ""
2979
2980 #.  ================== Memory Spread ==================
2981 #. type: Plain text
2982 #: build/C/man7/cpuset.7:580
2983 msgid ""
2984 "The I<memory_pressure> file provides an integer number representing the "
2985 "recent (half-life of 10 seconds) rate of entries to the direct reclaim code "
2986 "caused by any process in the cpuset, in units of reclaims attempted per "
2987 "second, times 1000."
2988 msgstr ""
2989
2990 #. type: SS
2991 #: build/C/man7/cpuset.7:580
2992 #, no-wrap
2993 msgid "Memory Spread"
2994 msgstr ""
2995
2996 #. type: Plain text
2997 #: build/C/man7/cpuset.7:588
2998 msgid ""
2999 "There are two Boolean flag files per cpuset that control where the kernel "
3000 "allocates pages for the file-system buffers and related in-kernel data "
3001 "structures.  They are called I<memory_spread_page> and "
3002 "I<memory_spread_slab>."
3003 msgstr ""
3004
3005 #. type: Plain text
3006 #: build/C/man7/cpuset.7:595
3007 msgid ""
3008 "If the per-cpuset Boolean flag file I<memory_spread_page> is set, then the "
3009 "kernel will spread the file-system buffers (page cache) evenly over all the "
3010 "nodes that the faulting process is allowed to use, instead of preferring to "
3011 "put those pages on the node where the process is running."
3012 msgstr ""
3013
3014 #. type: Plain text
3015 #: build/C/man7/cpuset.7:603
3016 msgid ""
3017 "If the per-cpuset Boolean flag file I<memory_spread_slab> is set, then the "
3018 "kernel will spread some file-system-related slab caches, such as those for "
3019 "inodes and directory entries, evenly over all the nodes that the faulting "
3020 "process is allowed to use, instead of preferring to put those pages on the "
3021 "node where the process is running."
3022 msgstr ""
3023
3024 #. type: Plain text
3025 #: build/C/man7/cpuset.7:608
3026 msgid ""
3027 "The setting of these flags does not affect the data segment (see B<brk>(2))  "
3028 "or stack segment pages of a process."
3029 msgstr ""
3030
3031 #. type: Plain text
3032 #: build/C/man7/cpuset.7:616
3033 msgid ""
3034 "By default, both kinds of memory spreading are off and the kernel prefers to "
3035 "allocate memory pages on the node local to where the requesting process is "
3036 "running.  If that node is not allowed by the process's NUMA memory policy or "
3037 "cpuset configuration or if there are insufficient free memory pages on that "
3038 "node, then the kernel looks for the nearest node that is allowed and has "
3039 "sufficient free memory."
3040 msgstr ""
3041
3042 #. type: Plain text
3043 #: build/C/man7/cpuset.7:619
3044 msgid ""
3045 "When new cpusets are created, they inherit the memory spread settings of "
3046 "their parent."
3047 msgstr ""
3048
3049 #. type: Plain text
3050 #: build/C/man7/cpuset.7:634
3051 msgid ""
3052 "Setting memory spreading causes allocations for the affected page or slab "
3053 "caches to ignore the process's NUMA memory policy and be spread instead.  "
3054 "However, the effect of these changes in memory placement caused by "
3055 "cpuset-specified memory spreading is hidden from the B<mbind>(2)  or "
3056 "B<set_mempolicy>(2)  calls.  These two NUMA memory policy calls always "
3057 "appear to behave as if no cpuset-specified memory spreading is in effect, "
3058 "even if it is.  If cpuset memory spreading is subsequently turned off, the "
3059 "NUMA memory policy most recently specified by these calls is automatically "
3060 "reapplied."
3061 msgstr ""
3062
3063 #. type: Plain text
3064 #: build/C/man7/cpuset.7:643
3065 msgid ""
3066 "Both I<memory_spread_page> and I<memory_spread_slab> are Boolean flag "
3067 "files.  By default they contain \"0\", meaning that the feature is off for "
3068 "that cpuset.  If a \"1\" is written to that file, that turns the named "
3069 "feature on."
3070 msgstr ""
3071
3072 #. type: Plain text
3073 #: build/C/man7/cpuset.7:646
3074 msgid ""
3075 "Cpuset-specified memory spreading behaves similarly to what is known (in "
3076 "other contexts) as round-robin or interleave memory placement."
3077 msgstr ""
3078
3079 #. type: Plain text
3080 #: build/C/man7/cpuset.7:649
3081 msgid ""
3082 "Cpuset-specified memory spreading can provide substantial performance "
3083 "improvements for jobs that:"
3084 msgstr ""
3085
3086 #. type: IP
3087 #: build/C/man7/cpuset.7:649
3088 #, no-wrap
3089 msgid "a)"
3090 msgstr ""
3091
3092 #. type: Plain text
3093 #: build/C/man7/cpuset.7:653
3094 msgid ""
3095 "need to place thread-local data on memory nodes close to the CPUs which are "
3096 "running the threads that most frequently access that data; but also"
3097 msgstr ""
3098
3099 #. type: IP
3100 #: build/C/man7/cpuset.7:653
3101 #, no-wrap
3102 msgid "b)"
3103 msgstr ""
3104
3105 #. type: Plain text
3106 #: build/C/man7/cpuset.7:656
3107 msgid ""
3108 "need to access large file-system data sets that must to be spread across the "
3109 "several nodes in the job's cpuset in order to fit."
3110 msgstr ""
3111
3112 #.  ================== Memory Migration ==================
3113 #. type: Plain text
3114 #: build/C/man7/cpuset.7:663
3115 msgid ""
3116 "Without this policy, the memory allocation across the nodes in the job's "
3117 "cpuset can become very uneven, especially for jobs that might have just a "
3118 "single thread initializing or reading in the data set."
3119 msgstr ""
3120
3121 #. type: SS
3122 #: build/C/man7/cpuset.7:663
3123 #, no-wrap
3124 msgid "Memory Migration"
3125 msgstr ""
3126
3127 #. type: Plain text
3128 #: build/C/man7/cpuset.7:672
3129 msgid ""
3130 "Normally, under the default setting (disabled) of I<memory_migrate>, once a "
3131 "page is allocated (given a physical page of main memory) then that page "
3132 "stays on whatever node it was allocated, so long as it remains allocated, "
3133 "even if the cpuset's memory-placement policy I<mems> subsequently changes."
3134 msgstr ""
3135
3136 #. type: Plain text
3137 #: build/C/man7/cpuset.7:678
3138 msgid ""
3139 "When memory migration is enabled in a cpuset, if the I<mems> setting of the "
3140 "cpuset is changed, then any memory page in use by any process in the cpuset "
3141 "that is on a memory node that is no longer allowed will be migrated to a "
3142 "memory node that is allowed."
3143 msgstr ""
3144
3145 #. type: Plain text
3146 #: build/C/man7/cpuset.7:684
3147 msgid ""
3148 "Furthermore, if a process is moved into a cpuset with I<memory_migrate> "
3149 "enabled, any memory pages it uses that were on memory nodes allowed in its "
3150 "previous cpuset, but which are not allowed in its new cpuset, will be "
3151 "migrated to a memory node allowed in the new cpuset."
3152 msgstr ""
3153
3154 #.  ================== Scheduler Load Balancing ==================
3155 #. type: Plain text
3156 #: build/C/man7/cpuset.7:692
3157 msgid ""
3158 "The relative placement of a migrated page within the cpuset is preserved "
3159 "during these migration operations if possible.  For example, if the page was "
3160 "on the second valid node of the prior cpuset, then the page will be placed "
3161 "on the second valid node of the new cpuset, if possible."
3162 msgstr ""
3163
3164 #. type: SS
3165 #: build/C/man7/cpuset.7:692
3166 #, no-wrap
3167 msgid "Scheduler Load Balancing"
3168 msgstr ""
3169
3170 #. type: Plain text
3171 #: build/C/man7/cpuset.7:699
3172 msgid ""
3173 "The kernel scheduler automatically load balances processes.  If one CPU is "
3174 "underutilized, the kernel will look for processes on other more overloaded "
3175 "CPUs and move those processes to the underutilized CPU, within the "
3176 "constraints of such placement mechanisms as cpusets and "
3177 "B<sched_setaffinity>(2)."
3178 msgstr ""
3179
3180 #. type: Plain text
3181 #: build/C/man7/cpuset.7:712
3182 msgid ""
3183 "The algorithmic cost of load balancing and its impact on key shared kernel "
3184 "data structures such as the process list increases more than linearly with "
3185 "the number of CPUs being balanced.  For example, it costs more to load "
3186 "balance across one large set of CPUs than it does to balance across two "
3187 "smaller sets of CPUs, each of half the size of the larger set.  (The precise "
3188 "relationship between the number of CPUs being balanced and the cost of load "
3189 "balancing depends on implementation details of the kernel process scheduler, "
3190 "which is subject to change over time, as improved kernel scheduler "
3191 "algorithms are implemented.)"
3192 msgstr ""
3193
3194 #. type: Plain text
3195 #: build/C/man7/cpuset.7:718
3196 msgid ""
3197 "The per-cpuset flag I<sched_load_balance> provides a mechanism to suppress "
3198 "this automatic scheduler load balancing in cases where it is not needed and "
3199 "suppressing it would have worthwhile performance benefits."
3200 msgstr ""
3201
3202 #. type: Plain text
3203 #: build/C/man7/cpuset.7:722
3204 msgid ""
3205 "By default, load balancing is done across all CPUs, except those marked "
3206 "isolated using the kernel boot time \"isolcpus=\" argument.  (See "
3207 "B<Scheduler Relax Domain Level>, below, to change this default.)"
3208 msgstr ""
3209
3210 #. type: Plain text
3211 #: build/C/man7/cpuset.7:725
3212 msgid ""
3213 "This default load balancing across all CPUs is not well suited to the "
3214 "following two situations:"
3215 msgstr ""
3216
3217 #. type: Plain text
3218 #: build/C/man7/cpuset.7:729
3219 msgid ""
3220 "On large systems, load balancing across many CPUs is expensive.  If the "
3221 "system is managed using cpusets to place independent jobs on separate sets "
3222 "of CPUs, full load balancing is unnecessary."
3223 msgstr ""
3224
3225 #. type: Plain text
3226 #: build/C/man7/cpuset.7:733
3227 msgid ""
3228 "Systems supporting real-time on some CPUs need to minimize system overhead "
3229 "on those CPUs, including avoiding process load balancing if that is not "
3230 "needed."
3231 msgstr ""
3232
3233 #. type: Plain text
3234 #: build/C/man7/cpuset.7:743
3235 msgid ""
3236 "When the per-cpuset flag I<sched_load_balance> is enabled (the default "
3237 "setting), it requests load balancing across all the CPUs in that cpuset's "
3238 "allowed CPUs, ensuring that load balancing can move a process (not otherwise "
3239 "pinned, as by B<sched_setaffinity>(2))  from any CPU in that cpuset to any "
3240 "other."
3241 msgstr ""
3242
3243 #. type: Plain text
3244 #: build/C/man7/cpuset.7:752
3245 msgid ""
3246 "When the per-cpuset flag I<sched_load_balance> is disabled, then the "
3247 "scheduler will avoid load balancing across the CPUs in that cpuset, "
3248 "I<except> in so far as is necessary because some overlapping cpuset has "
3249 "I<sched_load_balance> enabled."
3250 msgstr ""
3251
3252 #. type: Plain text
3253 #: build/C/man7/cpuset.7:760
3254 msgid ""
3255 "So, for example, if the top cpuset has the flag I<sched_load_balance> "
3256 "enabled, then the scheduler will load balance across all CPUs, and the "
3257 "setting of the I<sched_load_balance> flag in other cpusets has no effect, as "
3258 "we're already fully load balancing."
3259 msgstr ""
3260
3261 #. type: Plain text
3262 #: build/C/man7/cpuset.7:765
3263 msgid ""
3264 "Therefore in the above two situations, the flag I<sched_load_balance> should "
3265 "be disabled in the top cpuset, and only some of the smaller, child cpusets "
3266 "would have this flag enabled."
3267 msgstr ""
3268
3269 #. type: Plain text
3270 #: build/C/man7/cpuset.7:773
3271 msgid ""
3272 "When doing this, you don't usually want to leave any unpinned processes in "
3273 "the top cpuset that might use nontrivial amounts of CPU, as such processes "
3274 "may be artificially constrained to some subset of CPUs, depending on the "
3275 "particulars of this flag setting in descendant cpusets.  Even if such a "
3276 "process could use spare CPU cycles in some other CPUs, the kernel scheduler "
3277 "might not consider the possibility of load balancing that process to the "
3278 "underused CPU."
3279 msgstr ""
3280
3281 #.  ================== Scheduler Relax Domain Level ==================
3282 #. type: Plain text
3283 #: build/C/man7/cpuset.7:779
3284 msgid ""
3285 "Of course, processes pinned to a particular CPU can be left in a cpuset that "
3286 "disables I<sched_load_balance> as those processes aren't going anywhere else "
3287 "anyway."
3288 msgstr ""
3289
3290 #. type: SS
3291 #: build/C/man7/cpuset.7:779
3292 #, no-wrap
3293 msgid "Scheduler Relax Domain Level"
3294 msgstr ""
3295
3296 #. type: Plain text
3297 #: build/C/man7/cpuset.7:800
3298 msgid ""
3299 "The kernel scheduler performs immediate load balancing whenever a CPU "
3300 "becomes free or another task becomes runnable.  This load balancing works to "
3301 "ensure that as many CPUs as possible are usefully employed running tasks.  "
3302 "The kernel also performs periodic load balancing off the software clock "
3303 "described in I<time>(7).  The setting of I<sched_relax_domain_level> only "
3304 "applies to immediate load balancing.  Regardless of the "
3305 "I<sched_relax_domain_level> setting, periodic load balancing is attempted "
3306 "over all CPUs (unless disabled by turning off I<sched_load_balance>.)  In "
3307 "any case, of course, tasks will only be scheduled to run on CPUs allowed by "
3308 "their cpuset, as modified by B<sched_setaffinity>(2)  system calls."
3309 msgstr ""
3310
3311 #. type: Plain text
3312 #: build/C/man7/cpuset.7:808
3313 msgid ""
3314 "On small systems, such as those with just a few CPUs, immediate load "
3315 "balancing is useful to improve system interactivity and to minimize wasteful "
3316 "idle CPU cycles.  But on large systems, attempting immediate load balancing "
3317 "across a large number of CPUs can be more costly than it is worth, depending "
3318 "on the particular performance characteristics of the job mix and the "
3319 "hardware."
3320 msgstr ""
3321
3322 #. type: Plain text
3323 #: build/C/man7/cpuset.7:816
3324 msgid ""
3325 "The exact meaning of the small integer values of I<sched_relax_domain_level> "
3326 "will depend on internal implementation details of the kernel scheduler code "
3327 "and on the non-uniform architecture of the hardware.  Both of these will "
3328 "evolve over time and vary by system architecture and kernel version."
3329 msgstr ""
3330
3331 #. type: Plain text
3332 #: build/C/man7/cpuset.7:821
3333 msgid ""
3334 "As of this writing, when this capability was introduced in Linux 2.6.26, on "
3335 "certain popular architectures, the positive values of "
3336 "I<sched_relax_domain_level> have the following meanings."
3337 msgstr ""
3338
3339 #. type: IP
3340 #: build/C/man7/cpuset.7:823
3341 #, no-wrap
3342 msgid "B<(1)>"
3343 msgstr ""
3344
3345 #. type: Plain text
3346 #: build/C/man7/cpuset.7:826
3347 msgid ""
3348 "Perform immediate load balancing across Hyper-Thread siblings on the same "
3349 "core."
3350 msgstr ""
3351
3352 #. type: IP
3353 #: build/C/man7/cpuset.7:826
3354 #, no-wrap
3355 msgid "B<(2)>"
3356 msgstr ""
3357
3358 #. type: Plain text
3359 #: build/C/man7/cpuset.7:828
3360 msgid "Perform immediate load balancing across other cores in the same package."
3361 msgstr ""
3362
3363 #. type: IP
3364 #: build/C/man7/cpuset.7:828
3365 #, no-wrap
3366 msgid "B<(3)>"
3367 msgstr ""
3368
3369 #. type: Plain text
3370 #: build/C/man7/cpuset.7:831
3371 msgid ""
3372 "Perform immediate load balancing across other CPUs on the same node or "
3373 "blade."
3374 msgstr ""
3375
3376 #. type: IP
3377 #: build/C/man7/cpuset.7:831
3378 #, no-wrap
3379 msgid "B<(4)>"
3380 msgstr ""
3381
3382 #. type: Plain text
3383 #: build/C/man7/cpuset.7:834
3384 msgid ""
3385 "Perform immediate load balancing across over several (implementation detail) "
3386 "nodes [On NUMA systems]."
3387 msgstr ""
3388
3389 #. type: IP
3390 #: build/C/man7/cpuset.7:834
3391 #, no-wrap
3392 msgid "B<(5)>"
3393 msgstr ""
3394
3395 #. type: Plain text
3396 #: build/C/man7/cpuset.7:837
3397 msgid ""
3398 "Perform immediate load balancing across over all CPUs in system [On NUMA "
3399 "systems]."
3400 msgstr ""
3401
3402 #. type: Plain text
3403 #: build/C/man7/cpuset.7:846
3404 msgid ""
3405 "The I<sched_relax_domain_level> value of zero (0) always means don't perform "
3406 "immediate load balancing, hence that load balancing is only done "
3407 "periodically, not immediately when a CPU becomes available or another task "
3408 "becomes runnable."
3409 msgstr ""
3410
3411 #. type: Plain text
3412 #: build/C/man7/cpuset.7:854
3413 msgid ""
3414 "The I<sched_relax_domain_level> value of minus one (-1)  always means use "
3415 "the system default value.  The system default value can vary by architecture "
3416 "and kernel version.  This system default value can be changed by kernel "
3417 "boot-time \"relax_domain_level=\" argument."
3418 msgstr ""
3419
3420 #. type: Plain text
3421 #: build/C/man7/cpuset.7:862
3422 msgid ""
3423 "In the case of multiple overlapping cpusets which have conflicting "
3424 "I<sched_relax_domain_level> values, then the highest such value applies to "
3425 "all CPUs in any of the overlapping cpusets.  In such cases, the value "
3426 "B<minus one (-1)> is the lowest value, overridden by any other value, and "
3427 "the value B<zero (0)> is the next lowest value."
3428 msgstr ""
3429
3430 #. type: SH
3431 #: build/C/man7/cpuset.7:862
3432 #, no-wrap
3433 msgid "FORMATS"
3434 msgstr ""
3435
3436 #.  ================== Mask Format ==================
3437 #. type: Plain text
3438 #: build/C/man7/cpuset.7:866
3439 msgid "The following formats are used to represent sets of CPUs and memory nodes."
3440 msgstr ""
3441
3442 #. type: SS
3443 #: build/C/man7/cpuset.7:866
3444 #, no-wrap
3445 msgid "Mask Format"
3446 msgstr ""
3447
3448 #. type: Plain text
3449 #: build/C/man7/cpuset.7:871
3450 msgid ""
3451 "The B<Mask Format> is used to represent CPU and memory-node bitmasks in the "
3452 "I</proc/E<lt>pidE<gt>/status> file."
3453 msgstr ""
3454
3455 #. type: Plain text
3456 #: build/C/man7/cpuset.7:879
3457 msgid ""
3458 "This format displays each 32-bit word in hexadecimal (using ASCII characters "
3459 "\"0\" - \"9\" and \"a\" - \"f\"); words are filled with leading zeros, if "
3460 "required.  For masks longer than one word, a comma separator is used between "
3461 "words.  Words are displayed in big-endian order, which has the most "
3462 "significant bit first.  The hex digits within a word are also in big-endian "
3463 "order."
3464 msgstr ""
3465
3466 #. type: Plain text
3467 #: build/C/man7/cpuset.7:882
3468 msgid ""
3469 "The number of 32-bit words displayed is the minimum number needed to display "
3470 "all bits of the bitmask, based on the size of the bitmask."
3471 msgstr ""
3472
3473 #. type: Plain text
3474 #: build/C/man7/cpuset.7:884
3475 msgid "Examples of the B<Mask Format>:"
3476 msgstr ""
3477
3478 #. type: Plain text
3479 #: build/C/man7/cpuset.7:892
3480 #, no-wrap
3481 msgid ""
3482 "00000001                        # just bit 0 set\n"
3483 "40000000,00000000,00000000      # just bit 94 set\n"
3484 "00000001,00000000,00000000      # just bit 64 set\n"
3485 "000000ff,00000000               # bits 32-39 set\n"
3486 "00000000,000E3862               # 1,5,6,11-13,17-19 set\n"
3487 msgstr ""
3488
3489 #. type: Plain text
3490 #: build/C/man7/cpuset.7:896
3491 msgid "A mask with bits 0, 1, 2, 4, 8, 16, 32, and 64 set displays as:"
3492 msgstr ""
3493
3494 #. type: Plain text
3495 #: build/C/man7/cpuset.7:900
3496 #, no-wrap
3497 msgid "00000001,00000001,00010117\n"
3498 msgstr ""
3499
3500 #.  ================== List Format ==================
3501 #. type: Plain text
3502 #: build/C/man7/cpuset.7:907
3503 msgid ""
3504 "The first \"1\" is for bit 64, the second for bit 32, the third for bit 16, "
3505 "the fourth for bit 8, the fifth for bit 4, and the \"7\" is for bits 2, 1, "
3506 "and 0."
3507 msgstr ""
3508
3509 #. type: SS
3510 #: build/C/man7/cpuset.7:907
3511 #, no-wrap
3512 msgid "List Format"
3513 msgstr ""
3514
3515 #. type: Plain text
3516 #: build/C/man7/cpuset.7:914
3517 msgid ""
3518 "The B<List Format> for I<cpus> and I<mems> is a comma-separated list of CPU "
3519 "or memory-node numbers and ranges of numbers, in ASCII decimal."
3520 msgstr ""
3521
3522 #. type: Plain text
3523 #: build/C/man7/cpuset.7:916
3524 msgid "Examples of the B<List Format>:"
3525 msgstr ""
3526
3527 #. type: Plain text
3528 #: build/C/man7/cpuset.7:921
3529 #, no-wrap
3530 msgid ""
3531 "0-4,9           # bits 0, 1, 2, 3, 4, and 9 set\n"
3532 "0-2,7,12-14     # bits 0, 1, 2, 7, 12, 13, and 14 set\n"
3533 msgstr ""
3534
3535 #.  ================== RULES ==================
3536 #. type: SH
3537 #: build/C/man7/cpuset.7:924
3538 #, no-wrap
3539 msgid "RULES"
3540 msgstr ""
3541
3542 #. type: Plain text
3543 #: build/C/man7/cpuset.7:926
3544 msgid "The following rules apply to each cpuset:"
3545 msgstr ""
3546
3547 #. type: Plain text
3548 #: build/C/man7/cpuset.7:929
3549 msgid ""
3550 "Its CPUs and memory nodes must be a (possibly equal)  subset of its "
3551 "parent's."
3552 msgstr ""
3553
3554 #. type: Plain text
3555 #: build/C/man7/cpuset.7:933
3556 msgid "It can only be marked I<cpu_exclusive> if its parent is."
3557 msgstr ""
3558
3559 #. type: Plain text
3560 #: build/C/man7/cpuset.7:937
3561 msgid "It can only be marked I<mem_exclusive> if its parent is."
3562 msgstr ""
3563
3564 #. type: Plain text
3565 #: build/C/man7/cpuset.7:941
3566 msgid "If it is I<cpu_exclusive>, its CPUs may not overlap any sibling."
3567 msgstr ""
3568
3569 #.  ================== PERMISSIONS ==================
3570 #. type: Plain text
3571 #: build/C/man7/cpuset.7:946
3572 msgid "If it is I<memory_exclusive>, its memory nodes may not overlap any sibling."
3573 msgstr ""
3574
3575 #. type: SH
3576 #: build/C/man7/cpuset.7:946
3577 #, no-wrap
3578 msgid "PERMISSIONS"
3579 msgstr ""
3580
3581 #. type: Plain text
3582 #: build/C/man7/cpuset.7:951
3583 msgid ""
3584 "The permissions of a cpuset are determined by the permissions of the "
3585 "directories and pseudo-files in the cpuset file system, normally mounted at "
3586 "I</dev/cpuset>."
3587 msgstr ""
3588
3589 #. type: Plain text
3590 #: build/C/man7/cpuset.7:960
3591 msgid ""
3592 "For instance, a process can put itself in some other cpuset (than its "
3593 "current one) if it can write the I<tasks> file for that cpuset.  This "
3594 "requires execute permission on the encompassing directories and write "
3595 "permission on the I<tasks> file."
3596 msgstr ""
3597
3598 #. type: Plain text
3599 #: build/C/man7/cpuset.7:967
3600 msgid ""
3601 "An additional constraint is applied to requests to place some other process "
3602 "in a cpuset.  One process may not attach another to a cpuset unless it would "
3603 "have permission to send that process a signal (see B<kill>(2))."
3604 msgstr ""
3605
3606 #. type: Plain text
3607 #: build/C/man7/cpuset.7:978
3608 msgid ""
3609 "A process may create a child cpuset if it can access and write the parent "
3610 "cpuset directory.  It can modify the CPUs or memory nodes in a cpuset if it "
3611 "can access that cpuset's directory (execute permissions on the each of the "
3612 "parent directories) and write the corresponding I<cpus> or I<mems> file."
3613 msgstr ""
3614
3615 #. type: Plain text
3616 #: build/C/man7/cpuset.7:999
3617 msgid ""
3618 "There is one minor difference between the manner in which these permissions "
3619 "are evaluated and the manner in which normal file-system operation "
3620 "permissions are evaluated.  The kernel interprets relative pathnames "
3621 "starting at a process's current working directory.  Even if one is operating "
3622 "on a cpuset file, relative pathnames are interpreted relative to the "
3623 "process's current working directory, not relative to the process's current "
3624 "cpuset.  The only ways that cpuset paths relative to a process's current "
3625 "cpuset can be used are if either the process's current working directory is "
3626 "its cpuset (it first did a B<cd> or B<chdir>(2)  to its cpuset directory "
3627 "beneath I</dev/cpuset>, which is a bit unusual)  or if some user code "
3628 "converts the relative cpuset path to a full file-system path."
3629 msgstr ""
3630
3631 #.  ================== WARNINGS ==================
3632 #. type: Plain text
3633 #: build/C/man7/cpuset.7:1014
3634 msgid ""
3635 "In theory, this means that user code should specify cpusets using absolute "
3636 "pathnames, which requires knowing the mount point of the cpuset file system "
3637 "(usually, but not necessarily, I</dev/cpuset>).  In practice, all user level "
3638 "code that this author is aware of simply assumes that if the cpuset file "
3639 "system is mounted, then it is mounted at I</dev/cpuset>.  Furthermore, it is "
3640 "common practice for carefully written user code to verify the presence of "
3641 "the pseudo-file I</dev/cpuset/tasks> in order to verify that the cpuset "
3642 "pseudo-file system is currently mounted."
3643 msgstr ""
3644
3645 #. type: SH
3646 #: build/C/man7/cpuset.7:1014
3647 #, no-wrap
3648 msgid "WARNINGS"
3649 msgstr ""
3650
3651 #. type: SS
3652 #: build/C/man7/cpuset.7:1015
3653 #, no-wrap
3654 msgid "Enabling memory_pressure"
3655 msgstr ""
3656
3657 #. type: Plain text
3658 #: build/C/man7/cpuset.7:1024
3659 msgid ""
3660 "By default, the per-cpuset file I<memory_pressure> always contains zero "
3661 "(0).  Unless this feature is enabled by writing \"1\" to the pseudo-file "
3662 "I</dev/cpuset/memory_pressure_enabled>, the kernel does not compute "
3663 "per-cpuset I<memory_pressure>."
3664 msgstr ""
3665
3666 #. type: SS
3667 #: build/C/man7/cpuset.7:1024
3668 #, no-wrap
3669 msgid "Using the echo command"
3670 msgstr ""
3671
3672 #.  Gack!  csh(1)'s echo does this
3673 #. type: Plain text
3674 #: build/C/man7/cpuset.7:1035
3675 msgid ""
3676 "When using the B<echo> command at the shell prompt to change the values of "
3677 "cpuset files, beware that the built-in B<echo> command in some shells does "
3678 "not display an error message if the B<write>(2)  system call fails.  For "
3679 "example, if the command:"
3680 msgstr ""
3681
3682 #. type: Plain text
3683 #: build/C/man7/cpuset.7:1039
3684 #, no-wrap
3685 msgid "echo 19 E<gt> mems\n"
3686 msgstr ""
3687
3688 #. type: Plain text
3689 #: build/C/man7/cpuset.7:1052
3690 msgid ""
3691 "failed because memory node 19 was not allowed (perhaps the current system "
3692 "does not have a memory node 19), then the B<echo> command might not display "
3693 "any error.  It is better to use the B</bin/echo> external command to change "
3694 "cpuset file settings, as this command will display B<write>(2)  errors, as "
3695 "in the example:"
3696 msgstr ""
3697
3698 #. type: Plain text
3699 #: build/C/man7/cpuset.7:1057
3700 #, no-wrap
3701 msgid ""
3702 "/bin/echo 19 E<gt> mems\n"
3703 "/bin/echo: write error: Invalid argument\n"
3704 msgstr ""
3705
3706 #.  ================== EXCEPTIONS ==================
3707 #. type: SH
3708 #: build/C/man7/cpuset.7:1060
3709 #, no-wrap
3710 msgid "EXCEPTIONS"
3711 msgstr ""
3712
3713 #. type: SS
3714 #: build/C/man7/cpuset.7:1061
3715 #, no-wrap
3716 msgid "Memory placement"
3717 msgstr ""
3718
3719 #. type: Plain text
3720 #: build/C/man7/cpuset.7:1064
3721 msgid ""
3722 "Not all allocations of system memory are constrained by cpusets, for the "
3723 "following reasons."
3724 msgstr ""
3725
3726 #. type: Plain text
3727 #: build/C/man7/cpuset.7:1079
3728 msgid ""
3729 "If hot-plug functionality is used to remove all the CPUs that are currently "
3730 "assigned to a cpuset, then the kernel will automatically update the "
3731 "I<cpus_allowed> of all processes attached to CPUs in that cpuset to allow "
3732 "all CPUs.  When memory hot-plug functionality for removing memory nodes is "
3733 "available, a similar exception is expected to apply there as well.  In "
3734 "general, the kernel prefers to violate cpuset placement, rather than "
3735 "starving a process that has had all its allowed CPUs or memory nodes taken "
3736 "offline.  User code should reconfigure cpusets to only refer to online CPUs "
3737 "and memory nodes when using hot-plug to add or remove such resources."
3738 msgstr ""
3739
3740 #. type: Plain text
3741 #: build/C/man7/cpuset.7:1087
3742 msgid ""
3743 "A few kernel-critical, internal memory-allocation requests, marked "
3744 "GFP_ATOMIC, must be satisfied immediately.  The kernel may drop some request "
3745 "or malfunction if one of these allocations fail.  If such a request cannot "
3746 "be satisfied within the current process's cpuset, then we relax the cpuset, "
3747 "and look for memory anywhere we can find it.  It's better to violate the "
3748 "cpuset than stress the kernel."
3749 msgstr ""
3750
3751 #. type: Plain text
3752 #: build/C/man7/cpuset.7:1091
3753 msgid ""
3754 "Allocations of memory requested by kernel drivers while processing an "
3755 "interrupt lack any relevant process context, and are not confined by "
3756 "cpusets."
3757 msgstr ""
3758
3759 #. type: SS
3760 #: build/C/man7/cpuset.7:1091
3761 #, no-wrap
3762 msgid "Renaming cpusets"
3763 msgstr ""
3764
3765 #.  ================== ERRORS ==================
3766 #. type: Plain text
3767 #: build/C/man7/cpuset.7:1099
3768 msgid ""
3769 "You can use the B<rename>(2)  system call to rename cpusets.  Only simple "
3770 "renaming is supported; that is, changing the name of a cpuset directory is "
3771 "permitted, but moving a directory into a different directory is not "
3772 "permitted."
3773 msgstr ""
3774
3775 #. type: Plain text
3776 #: build/C/man7/cpuset.7:1103
3777 msgid ""
3778 "The Linux kernel implementation of cpusets sets I<errno> to specify the "
3779 "reason for a failed system call affecting cpusets."
3780 msgstr ""
3781
3782 #. type: Plain text
3783 #: build/C/man7/cpuset.7:1108
3784 msgid ""
3785 "The possible I<errno> settings and their meaning when set on a failed cpuset "
3786 "call are as listed below."
3787 msgstr ""
3788
3789 #. type: TP
3790 #: build/C/man7/cpuset.7:1108
3791 #, no-wrap
3792 msgid "B<E2BIG>"
3793 msgstr ""
3794
3795 #. type: Plain text
3796 #: build/C/man7/cpuset.7:1115
3797 msgid ""
3798 "Attempted a B<write>(2)  on a special cpuset file with a length larger than "
3799 "some kernel-determined upper limit on the length of such writes."
3800 msgstr ""
3801
3802 #. type: Plain text
3803 #: build/C/man7/cpuset.7:1122
3804 msgid ""
3805 "Attempted to B<write>(2)  the process ID (PID) of a process to a cpuset "
3806 "I<tasks> file when one lacks permission to move that process."
3807 msgstr ""
3808
3809 #. type: Plain text
3810 #: build/C/man7/cpuset.7:1128
3811 msgid ""
3812 "Attempted to add, using B<write>(2), a CPU or memory node to a cpuset, when "
3813 "that CPU or memory node was not already in its parent."
3814 msgstr ""
3815
3816 #. type: Plain text
3817 #: build/C/man7/cpuset.7:1136
3818 msgid ""
3819 "Attempted to set, using B<write>(2), I<cpu_exclusive> or I<mem_exclusive> on "
3820 "a cpuset whose parent lacks the same setting."
3821 msgstr ""
3822
3823 #. type: Plain text
3824 #: build/C/man7/cpuset.7:1143
3825 msgid "Attempted to B<write>(2)  a I<memory_pressure> file."
3826 msgstr ""
3827
3828 #. type: Plain text
3829 #: build/C/man7/cpuset.7:1146
3830 msgid "Attempted to create a file in a cpuset directory."
3831 msgstr ""
3832
3833 #. type: TP
3834 #: build/C/man7/cpuset.7:1146 build/C/man7/cpuset.7:1151 build/C/man7/cpuset.7:1156
3835 #, no-wrap
3836 msgid "B<EBUSY>"
3837 msgstr ""
3838
3839 #. type: Plain text
3840 #: build/C/man7/cpuset.7:1151
3841 msgid "Attempted to remove, using B<rmdir>(2), a cpuset with attached processes."
3842 msgstr ""
3843
3844 #. type: Plain text
3845 #: build/C/man7/cpuset.7:1156
3846 msgid "Attempted to remove, using B<rmdir>(2), a cpuset with child cpusets."
3847 msgstr ""
3848
3849 #. type: Plain text
3850 #: build/C/man7/cpuset.7:1161
3851 msgid ""
3852 "Attempted to remove a CPU or memory node from a cpuset that is also in a "
3853 "child of that cpuset."
3854 msgstr ""
3855
3856 #. type: TP
3857 #: build/C/man7/cpuset.7:1161 build/C/man7/cpuset.7:1166
3858 #, no-wrap
3859 msgid "B<EEXIST>"
3860 msgstr ""
3861
3862 #. type: Plain text
3863 #: build/C/man7/cpuset.7:1166
3864 msgid "Attempted to create, using B<mkdir>(2), a cpuset that already exists."
3865 msgstr ""
3866
3867 #. type: Plain text
3868 #: build/C/man7/cpuset.7:1171
3869 msgid "Attempted to B<rename>(2)  a cpuset to a name that already exists."
3870 msgstr ""
3871
3872 #. type: Plain text
3873 #: build/C/man7/cpuset.7:1179
3874 msgid ""
3875 "Attempted to B<read>(2)  or B<write>(2)  a cpuset file using a buffer that "
3876 "is outside the writing processes accessible address space."
3877 msgstr ""
3878
3879 #. type: Plain text
3880 #: build/C/man7/cpuset.7:1188
3881 msgid ""
3882 "Attempted to change a cpuset, using B<write>(2), in a way that would violate "
3883 "a I<cpu_exclusive> or I<mem_exclusive> attribute of that cpuset or any of "
3884 "its siblings."
3885 msgstr ""
3886
3887 #. type: Plain text
3888 #: build/C/man7/cpuset.7:1197
3889 msgid ""
3890 "Attempted to B<write>(2)  an empty I<cpus> or I<mems> list to a cpuset which "
3891 "has attached processes or child cpusets."
3892 msgstr ""
3893
3894 #. type: Plain text
3895 #: build/C/man7/cpuset.7:1207
3896 msgid ""
3897 "Attempted to B<write>(2)  a I<cpus> or I<mems> list which included a range "
3898 "with the second number smaller than the first number."
3899 msgstr ""
3900
3901 #. type: Plain text
3902 #: build/C/man7/cpuset.7:1216
3903 msgid ""
3904 "Attempted to B<write>(2)  a I<cpus> or I<mems> list which included an "
3905 "invalid character in the string."
3906 msgstr ""
3907
3908 #. type: Plain text
3909 #: build/C/man7/cpuset.7:1223
3910 msgid ""
3911 "Attempted to B<write>(2)  a list to a I<cpus> file that did not include any "
3912 "online CPUs."
3913 msgstr ""
3914
3915 #. type: Plain text
3916 #: build/C/man7/cpuset.7:1230
3917 msgid ""
3918 "Attempted to B<write>(2)  a list to a I<mems> file that did not include any "
3919 "online memory nodes."
3920 msgstr ""
3921
3922 #. type: Plain text
3923 #: build/C/man7/cpuset.7:1237
3924 msgid ""
3925 "Attempted to B<write>(2)  a list to a I<mems> file that included a node that "
3926 "held no memory."
3927 msgstr ""
3928
3929 #. type: Plain text
3930 #: build/C/man7/cpuset.7:1245
3931 msgid ""
3932 "Attempted to B<write>(2)  a string to a cpuset I<tasks> file that does not "
3933 "begin with an ASCII decimal integer."
3934 msgstr ""
3935
3936 #. type: Plain text
3937 #: build/C/man7/cpuset.7:1250
3938 msgid "Attempted to B<rename>(2)  a cpuset into a different directory."
3939 msgstr ""
3940
3941 #. type: Plain text
3942 #: build/C/man7/cpuset.7:1257
3943 msgid ""
3944 "Attempted to B<read>(2)  a I</proc/E<lt>pidE<gt>/cpuset> file for a cpuset "
3945 "path that is longer than the kernel page size."
3946 msgstr ""
3947
3948 #. type: Plain text
3949 #: build/C/man7/cpuset.7:1262
3950 msgid ""
3951 "Attempted to create, using B<mkdir>(2), a cpuset whose base directory name "
3952 "is longer than 255 characters."
3953 msgstr ""
3954
3955 #. type: Plain text
3956 #: build/C/man7/cpuset.7:1269
3957 msgid ""
3958 "Attempted to create, using B<mkdir>(2), a cpuset whose full pathname, "
3959 "including the mount point (typically \"/dev/cpuset/\") prefix, is longer "
3960 "than 4095 characters."
3961 msgstr ""
3962
3963 #. type: TP
3964 #: build/C/man7/cpuset.7:1269
3965 #, no-wrap
3966 msgid "B<ENODEV>"
3967 msgstr ""
3968
3969 #. type: Plain text
3970 #: build/C/man7/cpuset.7:1274
3971 msgid ""
3972 "The cpuset was removed by another process at the same time as a B<write>(2)  "
3973 "was attempted on one of the pseudo-files in the cpuset directory."
3974 msgstr ""
3975
3976 #. type: Plain text
3977 #: build/C/man7/cpuset.7:1279
3978 msgid ""
3979 "Attempted to create, using B<mkdir>(2), a cpuset in a parent cpuset that "
3980 "doesn't exist."
3981 msgstr ""
3982
3983 #. type: Plain text
3984 #: build/C/man7/cpuset.7:1286
3985 msgid ""
3986 "Attempted to B<access>(2)  or B<open>(2)  a nonexistent file in a cpuset "
3987 "directory."
3988 msgstr ""
3989
3990 #. type: Plain text
3991 #: build/C/man7/cpuset.7:1291
3992 msgid ""
3993 "Insufficient memory is available within the kernel; can occur on a variety "
3994 "of system calls affecting cpusets, but only if the system is extremely short "
3995 "of memory."
3996 msgstr ""
3997
3998 #. type: TP
3999 #: build/C/man7/cpuset.7:1291 build/C/man7/cpuset.7:1303
4000 #, no-wrap
4001 msgid "B<ENOSPC>"
4002 msgstr ""
4003
4004 #. type: Plain text
4005 #: build/C/man7/cpuset.7:1303
4006 msgid ""
4007 "Attempted to B<write>(2)  the process ID (PID)  of a process to a cpuset "
4008 "I<tasks> file when the cpuset had an empty I<cpus> or empty I<mems> setting."
4009 msgstr ""
4010
4011 #. type: Plain text
4012 #: build/C/man7/cpuset.7:1313
4013 msgid ""
4014 "Attempted to B<write>(2)  an empty I<cpus> or I<mems> setting to a cpuset "
4015 "that has tasks attached."
4016 msgstr ""
4017
4018 #. type: Plain text
4019 #: build/C/man7/cpuset.7:1318
4020 msgid "Attempted to B<rename>(2)  a nonexistent cpuset."
4021 msgstr ""
4022
4023 #. type: Plain text
4024 #: build/C/man7/cpuset.7:1321
4025 msgid "Attempted to remove a file from a cpuset directory."
4026 msgstr ""
4027
4028 #. type: TP
4029 #: build/C/man7/cpuset.7:1321
4030 #, no-wrap
4031 msgid "B<ERANGE>"
4032 msgstr ""
4033
4034 #. type: Plain text
4035 #: build/C/man7/cpuset.7:1329
4036 msgid ""
4037 "Specified a I<cpus> or I<mems> list to the kernel which included a number "
4038 "too large for the kernel to set in its bitmasks."
4039 msgstr ""
4040
4041 #.  ================== VERSIONS ==================
4042 #. type: Plain text
4043 #: build/C/man7/cpuset.7:1337
4044 msgid ""
4045 "Attempted to B<write>(2)  the process ID (PID) of a nonexistent process to a "
4046 "cpuset I<tasks> file."
4047 msgstr ""
4048
4049 #.  ================== NOTES ==================
4050 #. type: Plain text
4051 #: build/C/man7/cpuset.7:1340
4052 msgid "Cpusets appeared in version 2.6.12 of the Linux kernel."
4053 msgstr ""
4054
4055 #.  ================== BUGS ==================
4056 #. type: Plain text
4057 #: build/C/man7/cpuset.7:1351
4058 msgid ""
4059 "Despite its name, the I<pid> parameter is actually a thread ID, and each "
4060 "thread in a threaded group can be attached to a different cpuset.  The value "
4061 "returned from a call to B<gettid>(2)  can be passed in the argument I<pid>."
4062 msgstr ""
4063
4064 #. type: SH
4065 #: build/C/man7/cpuset.7:1351 build/C/man2/getrlimit.2:576 build/C/man2/ioprio_set.2:308 build/C/man2/setfsgid.2:102 build/C/man2/setfsuid.2:102
4066 #, no-wrap
4067 msgid "BUGS"
4068 msgstr ""
4069
4070 #.  ================== EXAMPLE ==================
4071 #. type: Plain text
4072 #: build/C/man7/cpuset.7:1364
4073 msgid ""
4074 "I<memory_pressure> cpuset files can be opened for writing, creation, or "
4075 "truncation, but then the B<write>(2)  fails with I<errno> set to B<EACCES>, "
4076 "and the creation and truncation options on B<open>(2)  have no effect."
4077 msgstr ""
4078
4079 #. type: SH
4080 #: build/C/man7/cpuset.7:1364 build/C/man2/getrlimit.2:520
4081 #, no-wrap
4082 msgid "EXAMPLE"
4083 msgstr ""
4084
4085 #. type: Plain text
4086 #: build/C/man7/cpuset.7:1367
4087 msgid ""
4088 "The following examples demonstrate querying and setting cpuset options using "
4089 "shell commands."
4090 msgstr ""
4091
4092 #. type: SS
4093 #: build/C/man7/cpuset.7:1367
4094 #, no-wrap
4095 msgid "Creating and attaching to a cpuset."
4096 msgstr ""
4097
4098 #. type: Plain text
4099 #: build/C/man7/cpuset.7:1370
4100 msgid ""
4101 "To create a new cpuset and attach the current command shell to it, the steps "
4102 "are:"
4103 msgstr ""
4104
4105 #. type: IP
4106 #: build/C/man7/cpuset.7:1372 build/C/man7/cpuset.7:1411
4107 #, no-wrap
4108 msgid "1)"
4109 msgstr ""
4110
4111 #. type: Plain text
4112 #: build/C/man7/cpuset.7:1374
4113 msgid "mkdir /dev/cpuset (if not already done)"
4114 msgstr ""
4115
4116 #. type: IP
4117 #: build/C/man7/cpuset.7:1374 build/C/man7/cpuset.7:1417
4118 #, no-wrap
4119 msgid "2)"
4120 msgstr ""
4121
4122 #. type: Plain text
4123 #: build/C/man7/cpuset.7:1376
4124 msgid "mount -t cpuset none /dev/cpuset (if not already done)"
4125 msgstr ""
4126
4127 #. type: IP
4128 #: build/C/man7/cpuset.7:1376 build/C/man7/cpuset.7:1420
4129 #, no-wrap
4130 msgid "3)"
4131 msgstr ""
4132
4133 #. type: Plain text
4134 #: build/C/man7/cpuset.7:1379
4135 msgid "Create the new cpuset using B<mkdir>(1)."
4136 msgstr ""
4137
4138 #. type: IP
4139 #: build/C/man7/cpuset.7:1379 build/C/man7/cpuset.7:1423
4140 #, no-wrap
4141 msgid "4)"
4142 msgstr ""
4143
4144 #. type: Plain text
4145 #: build/C/man7/cpuset.7:1381
4146 msgid "Assign CPUs and memory nodes to the new cpuset."
4147 msgstr ""
4148
4149 #. type: IP
4150 #: build/C/man7/cpuset.7:1381 build/C/man7/cpuset.7:1428
4151 #, no-wrap
4152 msgid "5)"
4153 msgstr ""
4154
4155 #. type: Plain text
4156 #: build/C/man7/cpuset.7:1383
4157 msgid "Attach the shell to the new cpuset."
4158 msgstr ""
4159
4160 #. type: Plain text
4161 #: build/C/man7/cpuset.7:1388
4162 msgid ""
4163 "For example, the following sequence of commands will set up a cpuset named "
4164 "\"Charlie\", containing just CPUs 2 and 3, and memory node 1, and then "
4165 "attach the current shell to that cpuset."
4166 msgstr ""
4167
4168 #. type: Plain text
4169 #: build/C/man7/cpuset.7:1402
4170 #, no-wrap
4171 msgid ""
4172 "$B< mkdir /dev/cpuset>\n"
4173 "$B< mount -t cpuset cpuset /dev/cpuset>\n"
4174 "$B< cd /dev/cpuset>\n"
4175 "$B< mkdir Charlie>\n"
4176 "$B< cd Charlie>\n"
4177 "$B< /bin/echo 2-3 E<gt> cpus>\n"
4178 "$B< /bin/echo 1 E<gt> mems>\n"
4179 "$B< /bin/echo $$ E<gt> tasks>\n"
4180 "# The current shell is now running in cpuset Charlie\n"
4181 "# The next line should display '/Charlie'\n"
4182 "$B< cat /proc/self/cpuset>\n"
4183 msgstr ""
4184
4185 #. type: SS
4186 #: build/C/man7/cpuset.7:1404
4187 #, no-wrap
4188 msgid "Migrating a job to different memory nodes."
4189 msgstr ""
4190
4191 #. type: Plain text
4192 #: build/C/man7/cpuset.7:1409
4193 msgid ""
4194 "To migrate a job (the set of processes attached to a cpuset)  to different "
4195 "CPUs and memory nodes in the system, including moving the memory pages "
4196 "currently allocated to that job, perform the following steps."
4197 msgstr ""
4198
4199 #. type: Plain text
4200 #: build/C/man7/cpuset.7:1417
4201 msgid ""
4202 "Let's say we want to move the job in cpuset I<alpha> (CPUs 4-7 and memory "
4203 "nodes 2-3) to a new cpuset I<beta> (CPUs 16-19 and memory nodes 8-9)."
4204 msgstr ""
4205
4206 #. type: Plain text
4207 #: build/C/man7/cpuset.7:1420
4208 msgid "First create the new cpuset I<beta>."
4209 msgstr ""
4210
4211 #. type: Plain text
4212 #: build/C/man7/cpuset.7:1423
4213 msgid "Then allow CPUs 16-19 and memory nodes 8-9 in I<beta>."
4214 msgstr ""
4215
4216 #. type: Plain text
4217 #: build/C/man7/cpuset.7:1428
4218 msgid "Then enable I<memory_migration> in I<beta>."
4219 msgstr ""
4220
4221 #. type: Plain text
4222 #: build/C/man7/cpuset.7:1433
4223 msgid "Then move each process from I<alpha> to I<beta>."
4224 msgstr ""
4225
4226 #. type: Plain text
4227 #: build/C/man7/cpuset.7:1436
4228 msgid "The following sequence of commands accomplishes this."
4229 msgstr ""
4230
4231 #. type: Plain text
4232 #: build/C/man7/cpuset.7:1446
4233 #, no-wrap
4234 msgid ""
4235 "$B< cd /dev/cpuset>\n"
4236 "$B< mkdir beta>\n"
4237 "$B< cd beta>\n"
4238 "$B< /bin/echo 16-19 E<gt> cpus>\n"
4239 "$B< /bin/echo 8-9 E<gt> mems>\n"
4240 "$B< /bin/echo 1 E<gt> memory_migrate>\n"
4241 "$B< while read i; do /bin/echo $i; done E<lt> ../alpha/tasks E<gt> tasks>\n"
4242 msgstr ""
4243
4244 #. type: Plain text
4245 #: build/C/man7/cpuset.7:1455
4246 msgid ""
4247 "The above should move any processes in I<alpha> to I<beta>, and any memory "
4248 "held by these processes on memory nodes 2-3 to memory nodes 8-9, "
4249 "respectively."
4250 msgstr ""
4251
4252 #. type: Plain text
4253 #: build/C/man7/cpuset.7:1457
4254 msgid "Notice that the last step of the above sequence did not do:"
4255 msgstr ""
4256
4257 #. type: Plain text
4258 #: build/C/man7/cpuset.7:1461
4259 #, no-wrap
4260 msgid "$B< cp ../alpha/tasks tasks>\n"
4261 msgstr ""
4262
4263 #. type: Plain text
4264 #: build/C/man7/cpuset.7:1472
4265 msgid ""
4266 "The I<while> loop, rather than the seemingly easier use of the B<cp>(1)  "
4267 "command, was necessary because only one process PID at a time may be written "
4268 "to the I<tasks> file."
4269 msgstr ""
4270
4271 #. type: Plain text
4272 #: build/C/man7/cpuset.7:1480
4273 msgid ""
4274 "The same effect (writing one PID at a time) as the I<while> loop can be "
4275 "accomplished more efficiently, in fewer keystrokes and in syntax that works "
4276 "on any shell, but alas more obscurely, by using the B<-u> (unbuffered) "
4277 "option of B<sed>(1):"
4278 msgstr ""
4279
4280 #. type: Plain text
4281 #: build/C/man7/cpuset.7:1484
4282 #, no-wrap
4283 msgid "$B< sed -un p E<lt> ../alpha/tasks E<gt> tasks>\n"
4284 msgstr ""
4285
4286 #. type: Plain text
4287 #: build/C/man7/cpuset.7:1501
4288 msgid ""
4289 "B<taskset>(1), B<get_mempolicy>(2), B<getcpu>(2), B<mbind>(2), "
4290 "B<sched_getaffinity>(2), B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
4291 "B<set_mempolicy>(2), B<CPU_SET>(3), B<proc>(5), B<numa>(7), "
4292 "B<migratepages>(8), B<numactl>(8)"
4293 msgstr ""
4294
4295 #. type: Plain text
4296 #: build/C/man7/cpuset.7:1504
4297 msgid "The kernel source file I<Documentation/cpusets.txt>."
4298 msgstr ""
4299
4300 #. type: TH
4301 #: build/C/man7/credentials.7:25
4302 #, no-wrap
4303 msgid "CREDENTIALS"
4304 msgstr ""
4305
4306 #. type: TH
4307 #: build/C/man7/credentials.7:25
4308 #, no-wrap
4309 msgid "2008-06-03"
4310 msgstr ""
4311
4312 #. type: Plain text
4313 #: build/C/man7/credentials.7:28
4314 msgid "credentials - process identifiers"
4315 msgstr ""
4316
4317 #. type: SS
4318 #: build/C/man7/credentials.7:29
4319 #, no-wrap
4320 msgid "Process ID (PID)"
4321 msgstr ""
4322
4323 #. type: Plain text
4324 #: build/C/man7/credentials.7:39
4325 msgid ""
4326 "Each process has a unique nonnegative integer identifier that is assigned "
4327 "when the process is created using B<fork>(2).  A process can obtain its PID "
4328 "using B<getpid>(2).  A PID is represented using the type I<pid_t> (defined "
4329 "in I<E<lt>sys/types.hE<gt>>)."
4330 msgstr ""
4331
4332 #.  .BR sched_rr_get_interval (2),
4333 #.  .BR sched_getaffinity (2),
4334 #.  .BR sched_setaffinity (2),
4335 #.  .BR sched_getparam (2),
4336 #.  .BR sched_setparam (2),
4337 #.  .BR sched_setscheduler (2),
4338 #.  .BR sched_getscheduler (2),
4339 #.  .BR getsid (2),
4340 #.  .BR waitid (2),
4341 #.  .BR wait4 (2),
4342 #. type: Plain text
4343 #: build/C/man7/credentials.7:60
4344 msgid ""
4345 "PIDs are used in a range of system calls to identify the process affected by "
4346 "the call, for example: B<kill>(2), B<ptrace>(2), B<setpriority>(2)  "
4347 "B<setpgid>(2), B<setsid>(2), B<sigqueue>(3), and B<waitpid>(2)."
4348 msgstr ""
4349
4350 #. type: Plain text
4351 #: build/C/man7/credentials.7:63
4352 msgid "A process's PID is preserved across an B<execve>(2)."
4353 msgstr ""
4354
4355 #. type: SS
4356 #: build/C/man7/credentials.7:63
4357 #, no-wrap
4358 msgid "Parent Process ID (PPID)"
4359 msgstr ""
4360
4361 #. type: Plain text
4362 #: build/C/man7/credentials.7:71
4363 msgid ""
4364 "A process's parent process ID identifies the process that created this "
4365 "process using B<fork>(2).  A process can obtain its PPID using "
4366 "B<getppid>(2).  A PPID is represented using the type I<pid_t>."
4367 msgstr ""
4368
4369 #. type: Plain text
4370 #: build/C/man7/credentials.7:74
4371 msgid "A process's PPID is preserved across an B<execve>(2)."
4372 msgstr ""
4373
4374 #. type: SS
4375 #: build/C/man7/credentials.7:74
4376 #, no-wrap
4377 msgid "Process Group ID and Session ID"
4378 msgstr ""
4379
4380 #. type: Plain text
4381 #: build/C/man7/credentials.7:82
4382 msgid ""
4383 "Each process has a session ID and a process group ID, both represented using "
4384 "the type I<pid_t>.  A process can obtain its session ID using B<getsid>(2), "
4385 "and its process group ID using B<getpgrp>(2)."
4386 msgstr ""
4387
4388 #. type: Plain text
4389 #: build/C/man7/credentials.7:88
4390 msgid ""
4391 "A child created by B<fork>(2)  inherits its parent's session ID and process "
4392 "group ID.  A process's session ID and process group ID are preserved across "
4393 "an B<execve>(2)."
4394 msgstr ""
4395
4396 #. type: Plain text
4397 #: build/C/man7/credentials.7:101
4398 msgid ""
4399 "Sessions and process groups are abstractions devised to support shell job "
4400 "control.  A process group (sometimes called a \"job\") is a collection of "
4401 "processes that share the same process group ID; the shell creates a new "
4402 "process group for the process(es) used to execute single command or pipeline "
4403 "(e.g., the two processes created to execute the command \"ls\\ |\\ wc\" are "
4404 "placed in the same process group).  A process's group membership can be set "
4405 "using B<setpgid>(2).  The process whose process ID is the same as its "
4406 "process group ID is the I<process group leader> for that group."
4407 msgstr ""
4408
4409 #. type: Plain text
4410 #: build/C/man7/credentials.7:113
4411 msgid ""
4412 "A session is a collection of processes that share the same session ID.  All "
4413 "of the members of a process group also have the same session ID (i.e., all "
4414 "of the members of a process group always belong to the same session, so that "
4415 "sessions and process groups form a strict two-level hierarchy of processes.)  "
4416 "A new session is created when a process calls B<setsid>(2), which creates a "
4417 "new session whose session ID is the same as the PID of the process that "
4418 "called B<setsid>(2).  The creator of the session is called the I<session "
4419 "leader>."
4420 msgstr ""
4421
4422 #. type: SS
4423 #: build/C/man7/credentials.7:113
4424 #, no-wrap
4425 msgid "User and Group Identifiers"
4426 msgstr ""
4427
4428 #. type: Plain text
4429 #: build/C/man7/credentials.7:121
4430 msgid ""
4431 "Each process has various associated user and groups IDs.  These IDs are "
4432 "integers, respectively represented using the types I<uid_t> and I<gid_t> "
4433 "(defined in I<E<lt>sys/types.hE<gt>>)."
4434 msgstr ""
4435
4436 #. type: Plain text
4437 #: build/C/man7/credentials.7:123
4438 msgid "On Linux, each process has the following user and group identifiers:"
4439 msgstr ""
4440
4441 #. type: Plain text
4442 #: build/C/man7/credentials.7:129
4443 msgid ""
4444 "Real user ID and real group ID.  These IDs determine who owns the process.  "
4445 "A process can obtain its real user (group) ID using B<getuid>(2)  "
4446 "(B<getgid>(2))."
4447 msgstr ""
4448
4449 #. type: Plain text
4450 #: build/C/man7/credentials.7:141
4451 msgid ""
4452 "Effective user ID and effective group ID.  These IDs are used by the kernel "
4453 "to determine the permissions that the process will have when accessing "
4454 "shared resources such as message queues, shared memory, and semaphores.  On "
4455 "most UNIX systems, these IDs also determine the permissions when accessing "
4456 "files.  However, Linux uses the file system IDs described below for this "
4457 "task.  A process can obtain its effective user (group) ID using "
4458 "B<geteuid>(2)  (B<getegid>(2))."
4459 msgstr ""
4460
4461 #. type: Plain text
4462 #: build/C/man7/credentials.7:163
4463 msgid ""
4464 "Saved set-user-ID and saved set-group-ID.  These IDs are used in set-user-ID "
4465 "and set-group-ID programs to save a copy of the corresponding effective IDs "
4466 "that were set when the program was executed (see B<execve>(2)).  A "
4467 "set-user-ID program can assume and drop privileges by switching its "
4468 "effective user ID back and forth between the values in its real user ID and "
4469 "saved set-user-ID.  This switching is done via calls to B<seteuid>(2), "
4470 "B<setreuid>(2), or B<setresuid>(2).  A set-group-ID program performs the "
4471 "analogous tasks using B<setegid>(2), B<setregid>(2), or B<setresgid>(2).  A "
4472 "process can obtain its saved set-user-ID (set-group-ID) using "
4473 "B<getresuid>(2)  (B<getresgid>(2))."
4474 msgstr ""
4475
4476 #. type: Plain text
4477 #: build/C/man7/credentials.7:180
4478 msgid ""
4479 "File system user ID and file system group ID (Linux-specific).  These IDs, "
4480 "in conjunction with the supplementary group IDs described below, are used to "
4481 "determine permissions for accessing files; see B<path_resolution>(7)  for "
4482 "details.  Whenever a process's effective user (group) ID is changed, the "
4483 "kernel also automatically changes the file system user (group) ID to the "
4484 "same value.  Consequently, the file system IDs normally have the same values "
4485 "as the corresponding effective ID, and the semantics for file-permission "
4486 "checks are thus the same on Linux as on other UNIX systems.  The file system "
4487 "IDs can be made to differ from the effective IDs by calling B<setfsuid>(2)  "
4488 "and B<setfsgid>(2)."
4489 msgstr ""
4490
4491 #.  Since kernel 2.6.4, the limit is visible via the read-only file
4492 #.  /proc/sys/kernel/ngroups_max.
4493 #.  As at 2.6.22-rc2, this file is still read-only.
4494 #. type: Plain text
4495 #: build/C/man7/credentials.7:199
4496 msgid ""
4497 "Supplementary group IDs.  This is a set of additional group IDs that are "
4498 "used for permission checks when accessing files and other shared resources.  "
4499 "On Linux kernels before 2.6.4, a process can be a member of up to 32 "
4500 "supplementary groups; since kernel 2.6.4, a process can be a member of up to "
4501 "65536 supplementary groups.  The call I<sysconf(_SC_NGROUPS_MAX)> can be "
4502 "used to determine the number of supplementary groups of which a process may "
4503 "be a member.  A process can obtain its set of supplementary group IDs using "
4504 "B<getgroups>(2), and can modify the set using B<setgroups>(2)."
4505 msgstr ""
4506
4507 #. type: Plain text
4508 #: build/C/man7/credentials.7:209
4509 msgid ""
4510 "A child process created by B<fork>(2)  inherits copies of its parent's user "
4511 "and groups IDs.  During an B<execve>(2), a process's real user and group ID "
4512 "and supplementary group IDs are preserved; the effective and saved set IDs "
4513 "may be changed, as described in B<execve>(2)."
4514 msgstr ""
4515
4516 #. type: Plain text
4517 #: build/C/man7/credentials.7:212
4518 msgid ""
4519 "Aside from the purposes noted above, a process's user IDs are also employed "
4520 "in a number of other contexts:"
4521 msgstr ""
4522
4523 #. type: Plain text
4524 #: build/C/man7/credentials.7:215
4525 msgid "when determining the permissions for sending signals\\(emsee B<kill>(2);"
4526 msgstr ""
4527
4528 #. type: Plain text
4529 #: build/C/man7/credentials.7:225
4530 msgid ""
4531 "when determining the permissions for setting process-scheduling parameters "
4532 "(nice value, real time scheduling policy and priority, CPU affinity, I/O "
4533 "priority) using B<setpriority>(2), B<sched_setaffinity>(2), "
4534 "B<sched_setscheduler>(2), B<sched_setparam>(2), and B<ioprio_set>(2);"
4535 msgstr ""
4536
4537 #. type: Plain text
4538 #: build/C/man7/credentials.7:228
4539 msgid "when checking resource limits; see B<getrlimit>(2);"
4540 msgstr ""
4541
4542 #. type: Plain text
4543 #: build/C/man7/credentials.7:232
4544 msgid ""
4545 "when checking the limit on the number of inotify instances that the process "
4546 "may create; see B<inotify>(7)."
4547 msgstr ""
4548
4549 #. type: Plain text
4550 #: build/C/man7/credentials.7:238
4551 msgid ""
4552 "Process IDs, parent process IDs, process group IDs, and session IDs are "
4553 "specified in POSIX.1-2001.  The real, effective, and saved set user and "
4554 "groups IDs, and the supplementary group IDs, are specified in POSIX.1-2001.  "
4555 "The file system user and group IDs are a Linux extension."
4556 msgstr ""
4557
4558 #. type: Plain text
4559 #: build/C/man7/credentials.7:250
4560 msgid ""
4561 "The POSIX threads specification requires that credentials are shared by all "
4562 "of the threads in a process.  However, at the kernel level, Linux maintains "
4563 "separate user and group credentials for each thread.  The NPTL threading "
4564 "implementation does some work to ensure that any change to user or group "
4565 "credentials (e.g., calls to B<setuid>(2), B<setresuid>(2), etc.)  is carried "
4566 "through to all of the POSIX threads in a process."
4567 msgstr ""
4568
4569 #. type: Plain text
4570 #: build/C/man7/credentials.7:281
4571 msgid ""
4572 "B<bash>(1), B<csh>(1), B<ps>(1), B<access>(2), B<execve>(2), "
4573 "B<faccessat>(2), B<fork>(2), B<getpgrp>(2), B<getpid>(2), B<getppid>(2), "
4574 "B<getsid>(2), B<kill>(2), B<killpg>(2), B<setegid>(2), B<seteuid>(2), "
4575 "B<setfsgid>(2), B<setfsuid>(2), B<setgid>(2), B<setgroups>(2), "
4576 "B<setresgid>(2), B<setresuid>(2), B<setuid>(2), B<waitpid>(2), "
4577 "B<euidaccess>(3), B<initgroups>(3), B<tcgetpgrp>(3), B<tcsetpgrp>(3), "
4578 "B<capabilities>(7), B<path_resolution>(7), B<unix>(7)"
4579 msgstr ""
4580
4581 #. type: TH
4582 #: build/C/man2/getgid.2:25
4583 #, no-wrap
4584 msgid "GETGID"
4585 msgstr ""
4586
4587 #. type: TH
4588 #: build/C/man2/getgid.2:25 build/C/man2/getgroups.2:31 build/C/man2/getresuid.2:27 build/C/man2/getuid.2:26 build/C/man2/setfsgid.2:29 build/C/man2/setfsuid.2:29 build/C/man2/setgid.2:27 build/C/man2/setresuid.2:26 build/C/man2/setreuid.2:43 build/C/man2/setuid.2:28
4589 #, no-wrap
4590 msgid "2010-11-22"
4591 msgstr ""
4592
4593 #. type: Plain text
4594 #: build/C/man2/getgid.2:28
4595 msgid "getgid, getegid - get group identity"
4596 msgstr ""
4597
4598 #. type: Plain text
4599 #: build/C/man2/getgid.2:30 build/C/man2/getgroups.2:38 build/C/man2/getpid.2:30 build/C/man2/getresuid.2:34 build/C/man2/getsid.2:30 build/C/man2/getuid.2:31 build/C/man2/seteuid.2:34 build/C/man2/setgid.2:34 build/C/man2/setpgid.2:51 build/C/man2/setresuid.2:33 build/C/man2/setreuid.2:50 build/C/man2/setsid.2:35 build/C/man2/setuid.2:35
4600 msgid "B<#include E<lt>unistd.hE<gt>>"
4601 msgstr ""
4602
4603 #. type: Plain text
4604 #: build/C/man2/getgid.2:32 build/C/man2/getgroups.2:36 build/C/man2/getpid.2:28 build/C/man2/getuid.2:33 build/C/man2/seteuid.2:32 build/C/man2/setgid.2:32 build/C/man2/setreuid.2:48 build/C/man2/setuid.2:33
4605 msgid "B<#include E<lt>sys/types.hE<gt>>"
4606 msgstr ""
4607
4608 #. type: Plain text
4609 #: build/C/man2/getgid.2:34
4610 msgid "B<gid_t getgid(void);>"
4611 msgstr ""
4612
4613 #. type: Plain text
4614 #: build/C/man2/getgid.2:36
4615 msgid "B<gid_t getegid(void);>"
4616 msgstr ""
4617
4618 #. type: Plain text
4619 #: build/C/man2/getgid.2:39
4620 msgid "B<getgid>()  returns the real group ID of the calling process."
4621 msgstr ""
4622
4623 #. type: Plain text
4624 #: build/C/man2/getgid.2:42
4625 msgid "B<getegid>()  returns the effective group ID of the calling process."
4626 msgstr ""
4627
4628 #. type: Plain text
4629 #: build/C/man2/getgid.2:44 build/C/man2/getpid.2:44 build/C/man2/getuid.2:45
4630 msgid "These functions are always successful."
4631 msgstr ""
4632
4633 #. type: Plain text
4634 #: build/C/man2/getgid.2:46 build/C/man2/getuid.2:47
4635 msgid "POSIX.1-2001, 4.3BSD."
4636 msgstr ""
4637
4638 #. type: Plain text
4639 #: build/C/man2/getgid.2:62
4640 msgid ""
4641 "The original Linux B<getgid>()  and B<getegid>()  system calls supported "
4642 "only 16-bit group IDs.  Subsequently, Linux 2.4 added B<getgid32>()  and "
4643 "B<getegid32>(), supporting 32-bit IDs.  The glibc B<getgid>()  and "
4644 "B<getegid>()  wrapper functions transparently deal with the variations "
4645 "across kernel versions."
4646 msgstr ""
4647
4648 #. type: Plain text
4649 #: build/C/man2/getgid.2:67
4650 msgid "B<getresgid>(2), B<setgid>(2), B<setregid>(2), B<credentials>(7)"
4651 msgstr ""
4652
4653 #. type: TH
4654 #: build/C/man2/getgroups.2:31
4655 #, no-wrap
4656 msgid "GETGROUPS"
4657 msgstr ""
4658
4659 #. type: Plain text
4660 #: build/C/man2/getgroups.2:34
4661 msgid "getgroups, setgroups - get/set list of supplementary group IDs"
4662 msgstr ""
4663
4664 #. type: Plain text
4665 #: build/C/man2/getgroups.2:40
4666 msgid "B<int getgroups(int >I<size>B<, gid_t >I<list>B<[]);>"
4667 msgstr ""
4668
4669 #. type: Plain text
4670 #: build/C/man2/getgroups.2:42
4671 msgid "B<#include E<lt>grp.hE<gt>>"
4672 msgstr ""
4673
4674 #. type: Plain text
4675 #: build/C/man2/getgroups.2:44
4676 msgid "B<int setgroups(size_t >I<size>B<, const gid_t *>I<list>B<);>"
4677 msgstr ""
4678
4679 #. type: Plain text
4680 #: build/C/man2/getgroups.2:52
4681 msgid "B<setgroups>(): _BSD_SOURCE"
4682 msgstr ""
4683
4684 #. type: Plain text
4685 #: build/C/man2/getgroups.2:70
4686 msgid ""
4687 "B<getgroups>()  returns the supplementary group IDs of the calling process "
4688 "in I<list>.  The argument I<size> should be set to the maximum number of "
4689 "items that can be stored in the buffer pointed to by I<list>.  If the "
4690 "calling process is a member of more than I<size> supplementary groups, then "
4691 "an error results.  It is unspecified whether the effective group ID of the "
4692 "calling process is included in the returned list.  (Thus, an application "
4693 "should also call B<getegid>(2)  and add or remove the resulting value.)"
4694 msgstr ""
4695
4696 #. type: Plain text
4697 #: build/C/man2/getgroups.2:81
4698 msgid ""
4699 "If I<size> is zero, I<list> is not modified, but the total number of "
4700 "supplementary group IDs for the process is returned.  This allows the caller "
4701 "to determine the size of a dynamically allocated I<list> to be used in a "
4702 "further call to B<getgroups>()."
4703 msgstr ""
4704
4705 #. type: Plain text
4706 #: build/C/man2/getgroups.2:92
4707 msgid ""
4708 "B<setgroups>()  sets the supplementary group IDs for the calling process.  "
4709 "Appropriate privileges (Linux: the B<CAP_SETGID> capability) are required.  "
4710 "The I<size> argument specifies the number of supplementary group IDs in the "
4711 "buffer pointed to by I<list>."
4712 msgstr ""
4713
4714 #. type: Plain text
4715 #: build/C/man2/getgroups.2:99
4716 msgid ""
4717 "On success, B<getgroups>()  returns the number of supplementary group IDs.  "
4718 "On error, -1 is returned, and I<errno> is set appropriately."
4719 msgstr ""
4720
4721 #. type: Plain text
4722 #: build/C/man2/getgroups.2:106
4723 msgid ""
4724 "On success, B<setgroups>()  returns 0.  On error, -1 is returned, and "
4725 "I<errno> is set appropriately."
4726 msgstr ""
4727
4728 #. type: Plain text
4729 #: build/C/man2/getgroups.2:111
4730 msgid "I<list> has an invalid address."
4731 msgstr ""
4732
4733 #. type: Plain text
4734 #: build/C/man2/getgroups.2:114
4735 msgid "B<getgroups>()  can additionally fail with the following error:"
4736 msgstr ""
4737
4738 #. type: Plain text
4739 #: build/C/man2/getgroups.2:118
4740 msgid "I<size> is less than the number of supplementary group IDs, but is not zero."
4741 msgstr ""
4742
4743 #. type: Plain text
4744 #: build/C/man2/getgroups.2:121
4745 msgid "B<setgroups>()  can additionally fail with the following errors:"
4746 msgstr ""
4747
4748 #. type: Plain text
4749 #: build/C/man2/getgroups.2:127
4750 msgid ""
4751 "I<size> is greater than B<NGROUPS_MAX> (32 before Linux 2.6.4; 65536 since "
4752 "Linux 2.6.4)."
4753 msgstr ""
4754
4755 #. type: Plain text
4756 #: build/C/man2/getgroups.2:133
4757 msgid "The calling process has insufficient privilege."
4758 msgstr ""
4759
4760 #. type: Plain text
4761 #: build/C/man2/getgroups.2:141
4762 msgid ""
4763 "SVr4, 4.3BSD.  The B<getgroups>()  function is in POSIX.1-2001.  Since "
4764 "B<setgroups>()  requires privilege, it is not covered by POSIX.1-2001."
4765 msgstr ""
4766
4767 #. type: Plain text
4768 #: build/C/man2/getgroups.2:149
4769 msgid ""
4770 "A process can have up to B<NGROUPS_MAX> supplementary group IDs in addition "
4771 "to the effective group ID.  The set of supplementary group IDs is inherited "
4772 "from the parent process, and preserved across an B<execve>(2)."
4773 msgstr ""
4774
4775 #. type: Plain text
4776 #: build/C/man2/getgroups.2:152
4777 msgid ""
4778 "The maximum number of supplementary group IDs can be found using "
4779 "B<sysconf>(3):"
4780 msgstr ""
4781
4782 #. type: Plain text
4783 #: build/C/man2/getgroups.2:156
4784 #, no-wrap
4785 msgid ""
4786 "    long ngroups_max;\n"
4787 "    ngroups_max = sysconf(_SC_NGROUPS_MAX);\n"
4788 msgstr ""
4789
4790 #. type: Plain text
4791 #: build/C/man2/getgroups.2:161
4792 msgid ""
4793 "The maximum return value of B<getgroups>()  cannot be larger than one more "
4794 "than this value."
4795 msgstr ""
4796
4797 #. type: Plain text
4798 #: build/C/man2/getgroups.2:171
4799 msgid ""
4800 "The original Linux B<getgroups>()  system call supported only 16-bit group "
4801 "IDs.  Subsequently, Linux 2.4 added B<getgroups32>(), supporting 32-bit "
4802 "IDs.  The glibc B<getgroups>()  wrapper function transparently deals with "
4803 "the variation across kernel versions."
4804 msgstr ""
4805
4806 #. type: Plain text
4807 #: build/C/man2/getgroups.2:178
4808 msgid ""
4809 "B<getgid>(2), B<setgid>(2), B<getgrouplist>(3), B<initgroups>(3), "
4810 "B<capabilities>(7), B<credentials>(7)"
4811 msgstr ""
4812
4813 #. type: TH
4814 #: build/C/man2/getpid.2:23
4815 #, no-wrap
4816 msgid "GETPID"
4817 msgstr ""
4818
4819 #. type: TH
4820 #: build/C/man2/getpid.2:23
4821 #, no-wrap
4822 msgid "2008-09-23"
4823 msgstr ""
4824
4825 #. type: Plain text
4826 #: build/C/man2/getpid.2:26
4827 msgid "getpid, getppid - get process identification"
4828 msgstr ""
4829
4830 #. type: Plain text
4831 #: build/C/man2/getpid.2:32
4832 msgid "B<pid_t getpid(void);>"
4833 msgstr ""
4834
4835 #. type: Plain text
4836 #: build/C/man2/getpid.2:34
4837 msgid "B<pid_t getppid(void);>"
4838 msgstr ""
4839
4840 #. type: Plain text
4841 #: build/C/man2/getpid.2:39
4842 msgid ""
4843 "B<getpid>()  returns the process ID of the calling process.  (This is often "
4844 "used by routines that generate unique temporary filenames.)"
4845 msgstr ""
4846
4847 #. type: Plain text
4848 #: build/C/man2/getpid.2:42
4849 msgid "B<getppid>()  returns the process ID of the parent of the calling process."
4850 msgstr ""
4851
4852 #. type: Plain text
4853 #: build/C/man2/getpid.2:46
4854 msgid "POSIX.1-2001, 4.3BSD, SVr4."
4855 msgstr ""
4856
4857 #.  The following program demonstrates this "feature":
4858 #
4859 #.  #define _GNU_SOURCE
4860 #.  #include <sys/syscall.h>
4861 #.  #include <sys/wait.h>
4862 #.  #include <stdio.h>
4863 #.  #include <stdlib.h>
4864 #.  #include <unistd.h>
4865 #
4866 #.  int
4867 #.  main(int argc, char *argv[])
4868 #.  {
4869 #.     /* The following statement fills the getpid() cache */
4870 #
4871 #.     printf("parent PID = %ld
4872 #. ", (long) getpid());
4873 #
4874 #.     if (syscall(SYS_fork) == 0) {
4875 #.         if (getpid() != syscall(SYS_getpid))
4876 #.             printf("child getpid() mismatch: getpid()=%ld; "
4877 #.                     "syscall(SYS_getpid)=%ld
4878 #. ",
4879 #.                     (long) getpid(), (long) syscall(SYS_getpid));
4880 #.         exit(EXIT_SUCCESS);
4881 #.     }
4882 #.     wait(NULL);
4883 #. }
4884 #. type: Plain text
4885 #: build/C/man2/getpid.2:98
4886 msgid ""
4887 "Since glibc version 2.3.4, the glibc wrapper function for B<getpid>()  "
4888 "caches PIDs, so as to avoid additional system calls when a process calls "
4889 "B<getpid>()  repeatedly.  Normally this caching is invisible, but its "
4890 "correct operation relies on support in the wrapper functions for B<fork>(2), "
4891 "B<vfork>(2), and B<clone>(2): if an application bypasses the glibc wrappers "
4892 "for these system calls by using B<syscall>(2), then a call to B<getpid>()  "
4893 "in the child will return the wrong value (to be precise: it will return the "
4894 "PID of the parent process).  See also B<clone>(2)  for discussion of a case "
4895 "where B<getpid>()  may return the wrong value even when invoking B<clone>(2)  "
4896 "via the glibc wrapper function."
4897 msgstr ""
4898
4899 #. type: Plain text
4900 #: build/C/man2/getpid.2:108
4901 msgid ""
4902 "B<clone>(2), B<fork>(2), B<kill>(2), B<exec>(3), B<mkstemp>(3), "
4903 "B<tempnam>(3), B<tmpfile>(3), B<tmpnam>(3), B<credentials>(7)"
4904 msgstr ""
4905
4906 #. type: TH
4907 #: build/C/man2/getpriority.2:46
4908 #, no-wrap
4909 msgid "GETPRIORITY"
4910 msgstr ""
4911
4912 #. type: TH
4913 #: build/C/man2/getpriority.2:46
4914 #, no-wrap
4915 msgid "2008-05-29"
4916 msgstr ""
4917
4918 #. type: Plain text
4919 #: build/C/man2/getpriority.2:49
4920 msgid "getpriority, setpriority - get/set program scheduling priority"
4921 msgstr ""
4922
4923 #. type: Plain text
4924 #: build/C/man2/getpriority.2:51 build/C/man2/getrlimit.2:69 build/C/man2/getrusage.2:44
4925 msgid "B<#include E<lt>sys/time.hE<gt>>"
4926 msgstr ""
4927
4928 #. type: Plain text
4929 #: build/C/man2/getpriority.2:53 build/C/man2/getrlimit.2:71 build/C/man2/getrusage.2:46
4930 msgid "B<#include E<lt>sys/resource.hE<gt>>"
4931 msgstr ""
4932
4933 #. type: Plain text
4934 #: build/C/man2/getpriority.2:55
4935 msgid "B<int getpriority(int >I<which>B<, int >I<who>B<);>"
4936 msgstr ""
4937
4938 #. type: Plain text
4939 #: build/C/man2/getpriority.2:57
4940 msgid "B<int setpriority(int >I<which>B<, int >I<who>B<, int >I<prio>B<);>"
4941 msgstr ""
4942
4943 #. type: Plain text
4944 #: build/C/man2/getpriority.2:68
4945 msgid ""
4946 "The scheduling priority of the process, process group, or user, as indicated "
4947 "by I<which> and I<who> is obtained with the B<getpriority>()  call and set "
4948 "with the B<setpriority>()  call."
4949 msgstr ""
4950
4951 #. type: Plain text
4952 #: build/C/man2/getpriority.2:95
4953 msgid ""
4954 "The value I<which> is one of B<PRIO_PROCESS>, B<PRIO_PGRP>, or B<PRIO_USER>, "
4955 "and I<who> is interpreted relative to I<which> (a process identifier for "
4956 "B<PRIO_PROCESS>, process group identifier for B<PRIO_PGRP>, and a user ID "
4957 "for B<PRIO_USER>).  A zero value for I<who> denotes (respectively) the "
4958 "calling process, the process group of the calling process, or the real user "
4959 "ID of the calling process.  I<Prio> is a value in the range -20 to 19 (but "
4960 "see the Notes below).  The default priority is 0; lower priorities cause "
4961 "more favorable scheduling."
4962 msgstr ""
4963
4964 #. type: Plain text
4965 #: build/C/man2/getpriority.2:105
4966 msgid ""
4967 "The B<getpriority>()  call returns the highest priority (lowest numerical "
4968 "value)  enjoyed by any of the specified processes.  The B<setpriority>()  "
4969 "call sets the priorities of all of the specified processes to the specified "
4970 "value.  Only the superuser may lower priorities."
4971 msgstr ""
4972
4973 #. type: Plain text
4974 #: build/C/man2/getpriority.2:118
4975 msgid ""
4976 "Since B<getpriority>()  can legitimately return the value -1, it is "
4977 "necessary to clear the external variable I<errno> prior to the call, then "
4978 "check it afterward to determine if -1 is an error or a legitimate value.  "
4979 "The B<setpriority>()  call returns 0 if there is no error, or -1 if there "
4980 "is."
4981 msgstr ""
4982
4983 #. type: Plain text
4984 #: build/C/man2/getpriority.2:127
4985 msgid "I<which> was not one of B<PRIO_PROCESS>, B<PRIO_PGRP>, or B<PRIO_USER>."
4986 msgstr ""
4987
4988 #. type: Plain text
4989 #: build/C/man2/getpriority.2:134
4990 msgid "No process was located using the I<which> and I<who> values specified."
4991 msgstr ""
4992
4993 #. type: Plain text
4994 #: build/C/man2/getpriority.2:138
4995 msgid "In addition to the errors indicated above, B<setpriority>()  may fail if:"
4996 msgstr ""
4997
4998 #. type: Plain text
4999 #: build/C/man2/getpriority.2:150
5000 msgid ""
5001 "The caller attempted to lower a process priority, but did not have the "
5002 "required privilege (on Linux: did not have the B<CAP_SYS_NICE> capability).  "
5003 "Since Linux 2.6.12, this error only occurs if the caller attempts to set a "
5004 "process priority outside the range of the B<RLIMIT_NICE> soft resource limit "
5005 "of the target process; see B<getrlimit>(2)  for details."
5006 msgstr ""
5007
5008 #. type: Plain text
5009 #: build/C/man2/getpriority.2:158
5010 msgid ""
5011 "A process was located, but its effective user ID did not match either the "
5012 "effective or the real user ID of the caller, and was not privileged (on "
5013 "Linux: did not have the B<CAP_SYS_NICE> capability).  But see NOTES below."
5014 msgstr ""
5015
5016 #. type: Plain text
5017 #: build/C/man2/getpriority.2:161
5018 msgid "SVr4, 4.4BSD (these function calls first appeared in 4.2BSD), POSIX.1-2001."
5019 msgstr ""
5020
5021 #. type: Plain text
5022 #: build/C/man2/getpriority.2:167
5023 msgid ""
5024 "A child created by B<fork>(2)  inherits its parent's nice value.  The nice "
5025 "value is preserved across B<execve>(2)."
5026 msgstr ""
5027
5028 #. type: Plain text
5029 #: build/C/man2/getpriority.2:178
5030 msgid ""
5031 "The degree to which their relative nice value affects the scheduling of "
5032 "processes varies across UNIX systems, and, on Linux, across kernel "
5033 "versions.  Starting with kernel 2.6.23, Linux adopted an algorithm that "
5034 "causes relative differences in nice values to have a much stronger effect.  "
5035 "This causes very low nice values (+19) to truly provide little CPU to a "
5036 "process whenever there is any other higher priority load on the system, and "
5037 "makes high nice values (-20) deliver most of the CPU to applications that "
5038 "require it (e.g., some audio applications)."
5039 msgstr ""
5040
5041 #. type: Plain text
5042 #: build/C/man2/getpriority.2:193
5043 msgid ""
5044 "The details on the condition for B<EPERM> depend on the system.  The above "
5045 "description is what POSIX.1-2001 says, and seems to be followed on all "
5046 "System V-like systems.  Linux kernels before 2.6.12 required the real or "
5047 "effective user ID of the caller to match the real user of the process I<who> "
5048 "(instead of its effective user ID).  Linux 2.6.12 and later require the "
5049 "effective user ID of the caller to match the real or effective user ID of "
5050 "the process I<who>.  All BSD-like systems (SunOS 4.1.3, Ultrix 4.2, 4.3BSD, "
5051 "FreeBSD 4.3, OpenBSD-2.5, ...) behave in the same manner as Linux 2.6.12 and "
5052 "later."
5053 msgstr ""
5054
5055 #. type: Plain text
5056 #: build/C/man2/getpriority.2:209
5057 msgid ""
5058 "The actual priority range varies between kernel versions.  Linux before "
5059 "1.3.36 had -infinity..15.  Since kernel 1.3.43 Linux has the range -20..19.  "
5060 "Within the kernel, nice values are actually represented using the "
5061 "corresponding range 40..1 (since negative numbers are error codes) and these "
5062 "are the values employed by the B<setpriority>()  and B<getpriority>()  "
5063 "system calls.  The glibc wrapper functions for these system calls handle the "
5064 "translations between the user-land and kernel representations of the nice "
5065 "value according to the formula I<unice\\ =\\ 20\\ -\\ knice>."
5066 msgstr ""
5067
5068 #. type: Plain text
5069 #: build/C/man2/getpriority.2:211
5070 msgid "On some systems, the range of nice values is -20..20."
5071 msgstr ""
5072
5073 #. type: Plain text
5074 #: build/C/man2/getpriority.2:223
5075 msgid ""
5076 "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases "
5077 "portability.  (Indeed, I<E<lt>sys/resource.hE<gt>> defines the I<rusage> "
5078 "structure with fields of type I<struct timeval> defined in "
5079 "I<E<lt>sys/time.hE<gt>>.)"
5080 msgstr ""
5081
5082 #. type: Plain text
5083 #: build/C/man2/getpriority.2:228
5084 msgid "B<nice>(1), B<renice>(1), B<fork>(2), B<capabilities>(7)"
5085 msgstr ""
5086
5087 #. type: Plain text
5088 #: build/C/man2/getpriority.2:231
5089 msgid ""
5090 "I<Documentation/scheduler/sched-nice-design.txt> in the kernel source tree "
5091 "(since Linux 2.6.23)."
5092 msgstr ""
5093
5094 #. type: TH
5095 #: build/C/man2/getresuid.2:27
5096 #, no-wrap
5097 msgid "GETRESUID"
5098 msgstr ""
5099
5100 #. type: Plain text
5101 #: build/C/man2/getresuid.2:30
5102 msgid "getresuid, getresgid - get real, effective and saved user/group IDs"
5103 msgstr ""
5104
5105 #. type: Plain text
5106 #: build/C/man2/getresuid.2:32 build/C/man2/setresuid.2:31
5107 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
5108 msgstr ""
5109
5110 #. type: Plain text
5111 #: build/C/man2/getresuid.2:36
5112 msgid "B<int getresuid(uid_t *>I<ruid>B<, uid_t *>I<euid>B<, uid_t *>I<suid>B<);>"
5113 msgstr ""
5114
5115 #. type: Plain text
5116 #: build/C/man2/getresuid.2:38
5117 msgid "B<int getresgid(gid_t *>I<rgid>B<, gid_t *>I<egid>B<, gid_t *>I<sgid>B<);>"
5118 msgstr ""
5119
5120 #. type: Plain text
5121 #: build/C/man2/getresuid.2:49
5122 msgid ""
5123 "B<getresuid>()  returns the real UID, the effective UID, and the saved "
5124 "set-user-ID of the calling process, in the arguments I<ruid>, I<euid>, and "
5125 "I<suid>, respectively.  B<getresgid>()  performs the analogous task for the "
5126 "process's group IDs."
5127 msgstr ""
5128
5129 #. type: Plain text
5130 #: build/C/man2/getresuid.2:59
5131 msgid ""
5132 "One of the arguments specified an address outside the calling program's "
5133 "address space."
5134 msgstr ""
5135
5136 #. type: Plain text
5137 #: build/C/man2/getresuid.2:61
5138 msgid "These system calls appeared on Linux starting with kernel 2.1.44."
5139 msgstr ""
5140
5141 #. type: Plain text
5142 #: build/C/man2/getresuid.2:66
5143 msgid ""
5144 "The prototypes are given by glibc since version 2.3.2, provided "
5145 "B<_GNU_SOURCE> is defined."
5146 msgstr ""
5147
5148 #. type: Plain text
5149 #: build/C/man2/getresuid.2:69 build/C/man2/setresuid.2:86
5150 msgid "These calls are nonstandard; they also appear on HP-UX and some of the BSDs."
5151 msgstr ""
5152
5153 #. type: Plain text
5154 #: build/C/man2/getresuid.2:85
5155 msgid ""
5156 "The original Linux B<getresuid>()  and B<getresgid>()  system calls "
5157 "supported only 16-bit user and group IDs.  Subsequently, Linux 2.4 added "
5158 "B<getresuid32>()  and B<getresgid32>(), supporting 32-bit IDs.  The glibc "
5159 "B<getresuid>()  and B<getresgid>()  wrapper functions transparently deal "
5160 "with the variations across kernel versions."
5161 msgstr ""
5162
5163 #. type: Plain text
5164 #: build/C/man2/getresuid.2:91
5165 msgid ""
5166 "B<getuid>(2), B<setresuid>(2), B<setreuid>(2), B<setuid>(2), "
5167 "B<credentials>(7)"
5168 msgstr ""
5169
5170 #. type: TH
5171 #: build/C/man2/getrlimit.2:64
5172 #, no-wrap
5173 msgid "GETRLIMIT"
5174 msgstr ""
5175
5176 #. type: TH
5177 #: build/C/man2/getrlimit.2:64
5178 #, no-wrap
5179 msgid "2011-09-10"
5180 msgstr ""
5181
5182 #. type: Plain text
5183 #: build/C/man2/getrlimit.2:67
5184 msgid "getrlimit, setrlimit, prlimit - get/set resource limits"
5185 msgstr ""
5186
5187 #. type: Plain text
5188 #: build/C/man2/getrlimit.2:73
5189 msgid "B<int getrlimit(int >I<resource>B<, struct rlimit *>I<rlim>B<);>"
5190 msgstr ""
5191
5192 #. type: Plain text
5193 #: build/C/man2/getrlimit.2:75
5194 msgid "B<int setrlimit(int >I<resource>B<, const struct rlimit *>I<rlim>B<);>"
5195 msgstr ""
5196
5197 #. type: Plain text
5198 #: build/C/man2/getrlimit.2:78
5199 msgid ""
5200 "B<int prlimit(pid_t >I<pid>B<, int >I<resource>B<, const struct rlimit "
5201 "*>I<new_limit>B<,>"
5202 msgstr ""
5203
5204 #. type: Plain text
5205 #: build/C/man2/getrlimit.2:80
5206 msgid "B< struct rlimit *>I<old_limit>B<);>"
5207 msgstr ""
5208
5209 #. type: Plain text
5210 #: build/C/man2/getrlimit.2:88
5211 msgid "B<prlimit>(): _GNU_SOURCE && _FILE_OFFSET_BITS == 64"
5212 msgstr ""
5213
5214 #. type: Plain text
5215 #: build/C/man2/getrlimit.2:97
5216 msgid ""
5217 "The B<getrlimit>()  and B<setrlimit>()  system calls get and set resource "
5218 "limits respectively.  Each resource has an associated soft and hard limit, "
5219 "as defined by the I<rlimit> structure:"
5220 msgstr ""
5221
5222 #. type: Plain text
5223 #: build/C/man2/getrlimit.2:104
5224 #, no-wrap
5225 msgid ""
5226 "struct rlimit {\n"
5227 "    rlim_t rlim_cur;  /* Soft limit */\n"
5228 "    rlim_t rlim_max;  /* Hard limit (ceiling for rlim_cur) */\n"
5229 "};\n"
5230 msgstr ""
5231
5232 #. type: Plain text
5233 #: build/C/man2/getrlimit.2:115
5234 msgid ""
5235 "The soft limit is the value that the kernel enforces for the corresponding "
5236 "resource.  The hard limit acts as a ceiling for the soft limit: an "
5237 "unprivileged process may only set its soft limit to a value in the range "
5238 "from 0 up to the hard limit, and (irreversibly) lower its hard limit.  A "
5239 "privileged process (under Linux: one with the B<CAP_SYS_RESOURCE> "
5240 "capability) may make arbitrary changes to either limit value."
5241 msgstr ""
5242
5243 #. type: Plain text
5244 #: build/C/man2/getrlimit.2:122
5245 msgid ""
5246 "The value B<RLIM_INFINITY> denotes no limit on a resource (both in the "
5247 "structure returned by B<getrlimit>()  and in the structure passed to "
5248 "B<setrlimit>())."
5249 msgstr ""
5250
5251 #. type: Plain text
5252 #: build/C/man2/getrlimit.2:126
5253 msgid "The I<resource> argument must be one of:"
5254 msgstr ""
5255
5256 #. type: TP
5257 #: build/C/man2/getrlimit.2:126
5258 #, no-wrap
5259 msgid "B<RLIMIT_AS>"
5260 msgstr ""
5261
5262 #.  since 2.0.27 / 2.1.12
5263 #. type: Plain text
5264 #: build/C/man2/getrlimit.2:146
5265 msgid ""
5266 "The maximum size of the process's virtual memory (address space) in bytes.  "
5267 "This limit affects calls to B<brk>(2), B<mmap>(2)  and B<mremap>(2), which "
5268 "fail with the error B<ENOMEM> upon exceeding this limit.  Also automatic "
5269 "stack expansion will fail (and generate a B<SIGSEGV> that kills the process "
5270 "if no alternate stack has been made available via B<sigaltstack>(2)).  Since "
5271 "the value is a I<long>, on machines with a 32-bit I<long> either this limit "
5272 "is at most 2 GiB, or this resource is unlimited."
5273 msgstr ""
5274
5275 #. type: TP
5276 #: build/C/man2/getrlimit.2:146
5277 #, no-wrap
5278 msgid "B<RLIMIT_CORE>"
5279 msgstr ""
5280
5281 #. type: Plain text
5282 #: build/C/man2/getrlimit.2:153
5283 msgid ""
5284 "Maximum size of I<core> file.  When 0 no core dump files are created.  When "
5285 "nonzero, larger dumps are truncated to this size."
5286 msgstr ""
5287
5288 #. type: TP
5289 #: build/C/man2/getrlimit.2:153
5290 #, no-wrap
5291 msgid "B<RLIMIT_CPU>"
5292 msgstr ""
5293
5294 #. type: Plain text
5295 #: build/C/man2/getrlimit.2:173
5296 msgid ""
5297 "CPU time limit in seconds.  When the process reaches the soft limit, it is "
5298 "sent a B<SIGXCPU> signal.  The default action for this signal is to "
5299 "terminate the process.  However, the signal can be caught, and the handler "
5300 "can return control to the main program.  If the process continues to consume "
5301 "CPU time, it will be sent B<SIGXCPU> once per second until the hard limit is "
5302 "reached, at which time it is sent B<SIGKILL>.  (This latter point describes "
5303 "Linux behavior.  Implementations vary in how they treat processes which "
5304 "continue to consume CPU time after reaching the soft limit.  Portable "
5305 "applications that need to catch this signal should perform an orderly "
5306 "termination upon first receipt of B<SIGXCPU>.)"
5307 msgstr ""
5308
5309 #. type: TP
5310 #: build/C/man2/getrlimit.2:173
5311 #, no-wrap
5312 msgid "B<RLIMIT_DATA>"
5313 msgstr ""
5314
5315 #. type: Plain text
5316 #: build/C/man2/getrlimit.2:184
5317 msgid ""
5318 "The maximum size of the process's data segment (initialized data, "
5319 "uninitialized data, and heap).  This limit affects calls to B<brk>(2)  and "
5320 "B<sbrk>(2), which fail with the error B<ENOMEM> upon encountering the soft "
5321 "limit of this resource."
5322 msgstr ""
5323
5324 #. type: TP
5325 #: build/C/man2/getrlimit.2:184
5326 #, no-wrap
5327 msgid "B<RLIMIT_FSIZE>"
5328 msgstr ""
5329
5330 #. type: Plain text
5331 #: build/C/man2/getrlimit.2:196
5332 msgid ""
5333 "The maximum size of files that the process may create.  Attempts to extend a "
5334 "file beyond this limit result in delivery of a B<SIGXFSZ> signal.  By "
5335 "default, this signal terminates a process, but a process can catch this "
5336 "signal instead, in which case the relevant system call (e.g., B<write>(2), "
5337 "B<truncate>(2))  fails with the error B<EFBIG>."
5338 msgstr ""
5339
5340 #. type: TP
5341 #: build/C/man2/getrlimit.2:196
5342 #, no-wrap
5343 msgid "B<RLIMIT_LOCKS> (Early Linux 2.4 only)"
5344 msgstr ""
5345
5346 #.  to be precise: Linux 2.4.0-test9; no longer in 2.4.25 / 2.5.65
5347 #. type: Plain text
5348 #: build/C/man2/getrlimit.2:204
5349 msgid ""
5350 "A limit on the combined number of B<flock>(2)  locks and B<fcntl>(2)  leases "
5351 "that this process may establish."
5352 msgstr ""
5353
5354 #. type: TP
5355 #: build/C/man2/getrlimit.2:204
5356 #, no-wrap
5357 msgid "B<RLIMIT_MEMLOCK>"
5358 msgstr ""
5359
5360 #. type: Plain text
5361 #: build/C/man2/getrlimit.2:242
5362 msgid ""
5363 "The maximum number of bytes of memory that may be locked into RAM.  In "
5364 "effect this limit is rounded down to the nearest multiple of the system page "
5365 "size.  This limit affects B<mlock>(2)  and B<mlockall>(2)  and the "
5366 "B<mmap>(2)  B<MAP_LOCKED> operation.  Since Linux 2.6.9 it also affects the "
5367 "B<shmctl>(2)  B<SHM_LOCK> operation, where it sets a maximum on the total "
5368 "bytes in shared memory segments (see B<shmget>(2))  that may be locked by "
5369 "the real user ID of the calling process.  The B<shmctl>(2)  B<SHM_LOCK> "
5370 "locks are accounted for separately from the per-process memory locks "
5371 "established by B<mlock>(2), B<mlockall>(2), and B<mmap>(2)  B<MAP_LOCKED>; a "
5372 "process can lock bytes up to this limit in each of these two categories.  In "
5373 "Linux kernels before 2.6.9, this limit controlled the amount of memory that "
5374 "could be locked by a privileged process.  Since Linux 2.6.9, no limits are "
5375 "placed on the amount of memory that a privileged process may lock, and this "
5376 "limit instead governs the amount of memory that an unprivileged process may "
5377 "lock."
5378 msgstr ""
5379
5380 #. type: TP
5381 #: build/C/man2/getrlimit.2:242
5382 #, no-wrap
5383 msgid "B<RLIMIT_MSGQUEUE> (Since Linux 2.6.8)"
5384 msgstr ""
5385
5386 #. type: Plain text
5387 #: build/C/man2/getrlimit.2:250
5388 msgid ""
5389 "Specifies the limit on the number of bytes that can be allocated for POSIX "
5390 "message queues for the real user ID of the calling process.  This limit is "
5391 "enforced for B<mq_open>(3).  Each message queue that the user creates counts "
5392 "(until it is removed)  against this limit according to the formula:"
5393 msgstr ""
5394
5395 #. type: Plain text
5396 #: build/C/man2/getrlimit.2:254
5397 #, no-wrap
5398 msgid ""
5399 "    bytes = attr.mq_maxmsg * sizeof(struct msg_msg *) +\n"
5400 "            attr.mq_maxmsg * attr.mq_msgsize\n"
5401 msgstr ""
5402
5403 #. type: Plain text
5404 #: build/C/man2/getrlimit.2:262
5405 msgid ""
5406 "where I<attr> is the I<mq_attr> structure specified as the fourth argument "
5407 "to B<mq_open>(3)."
5408 msgstr ""
5409
5410 #. type: Plain text
5411 #: build/C/man2/getrlimit.2:268
5412 msgid ""
5413 "The first addend in the formula, which includes I<sizeof(struct msg_msg *)> "
5414 "(4 bytes on Linux/i386), ensures that the user cannot create an unlimited "
5415 "number of zero-length messages (such messages nevertheless each consume some "
5416 "system memory for bookkeeping overhead)."
5417 msgstr ""
5418
5419 #. type: TP
5420 #: build/C/man2/getrlimit.2:268
5421 #, no-wrap
5422 msgid "B<RLIMIT_NICE> (since Linux 2.6.12, but see BUGS below)"
5423 msgstr ""
5424
5425 #. type: Plain text
5426 #: build/C/man2/getrlimit.2:281
5427 msgid ""
5428 "Specifies a ceiling to which the process's nice value can be raised using "
5429 "B<setpriority>(2)  or B<nice>(2).  The actual ceiling for the nice value is "
5430 "calculated as I<20\\ -\\ rlim_cur>.  (This strangeness occurs because "
5431 "negative numbers cannot be specified as resource limit values, since they "
5432 "typically have special meanings.  For example, B<RLIM_INFINITY> typically is "
5433 "the same as -1.)"
5434 msgstr ""
5435
5436 #. type: TP
5437 #: build/C/man2/getrlimit.2:281
5438 #, no-wrap
5439 msgid "B<RLIMIT_NOFILE>"
5440 msgstr ""
5441
5442 #. type: Plain text
5443 #: build/C/man2/getrlimit.2:295
5444 msgid ""
5445 "Specifies a value one greater than the maximum file descriptor number that "
5446 "can be opened by this process.  Attempts (B<open>(2), B<pipe>(2), B<dup>(2), "
5447 "etc.)  to exceed this limit yield the error B<EMFILE>.  (Historically, this "
5448 "limit was named B<RLIMIT_OFILE> on BSD.)"
5449 msgstr ""
5450
5451 #. type: TP
5452 #: build/C/man2/getrlimit.2:295
5453 #, no-wrap
5454 msgid "B<RLIMIT_NPROC>"
5455 msgstr ""
5456
5457 #. type: Plain text
5458 #: build/C/man2/getrlimit.2:303
5459 msgid ""
5460 "The maximum number of processes (or, more precisely on Linux, threads)  that "
5461 "can be created for the real user ID of the calling process.  Upon "
5462 "encountering this limit, B<fork>(2)  fails with the error B<EAGAIN>."
5463 msgstr ""
5464
5465 #. type: TP
5466 #: build/C/man2/getrlimit.2:303
5467 #, no-wrap
5468 msgid "B<RLIMIT_RSS>"
5469 msgstr ""
5470
5471 #.  As at kernel 2.6.12, this limit still does nothing in 2.6 though
5472 #.  talk of making it do something has surfaced from time to time in LKML
5473 #.        -- MTK, Jul 05
5474 #. type: Plain text
5475 #: build/C/man2/getrlimit.2:315
5476 msgid ""
5477 "Specifies the limit (in pages) of the process's resident set (the number of "
5478 "virtual pages resident in RAM).  This limit only has effect in Linux 2.4.x, "
5479 "x E<lt> 30, and there only affects calls to B<madvise>(2)  specifying "
5480 "B<MADV_WILLNEED>."
5481 msgstr ""
5482
5483 #. type: TP
5484 #: build/C/man2/getrlimit.2:315
5485 #, no-wrap
5486 msgid "B<RLIMIT_RTPRIO> (Since Linux 2.6.12, but see BUGS)"
5487 msgstr ""
5488
5489 #. type: Plain text
5490 #: build/C/man2/getrlimit.2:322
5491 msgid ""
5492 "Specifies a ceiling on the real-time priority that may be set for this "
5493 "process using B<sched_setscheduler>(2)  and B<sched_setparam>(2)."
5494 msgstr ""
5495
5496 #. type: TP
5497 #: build/C/man2/getrlimit.2:322
5498 #, no-wrap
5499 msgid "B<RLIMIT_RTTIME> (Since Linux 2.6.25)"
5500 msgstr ""
5501
5502 #. type: Plain text
5503 #: build/C/man2/getrlimit.2:334
5504 msgid ""
5505 "Specifies a limit (in microseconds)  on the amount of CPU time that a "
5506 "process scheduled under a real-time scheduling policy may consume without "
5507 "making a blocking system call.  For the purpose of this limit, each time a "
5508 "process makes a blocking system call, the count of its consumed CPU time is "
5509 "reset to zero.  The CPU time count is not reset if the process continues "
5510 "trying to use the CPU but is preempted, its time slice expires, or it calls "
5511 "B<sched_yield>(2)."
5512 msgstr ""
5513
5514 #. type: Plain text
5515 #: build/C/man2/getrlimit.2:345
5516 msgid ""
5517 "Upon reaching the soft limit, the process is sent a B<SIGXCPU> signal.  If "
5518 "the process catches or ignores this signal and continues consuming CPU time, "
5519 "then B<SIGXCPU> will be generated once each second until the hard limit is "
5520 "reached, at which point the process is sent a B<SIGKILL> signal."
5521 msgstr ""
5522
5523 #. type: Plain text
5524 #: build/C/man2/getrlimit.2:348
5525 msgid ""
5526 "The intended use of this limit is to stop a runaway real-time process from "
5527 "locking up the system."
5528 msgstr ""
5529
5530 #. type: TP
5531 #: build/C/man2/getrlimit.2:348
5532 #, no-wrap
5533 msgid "B<RLIMIT_SIGPENDING> (Since Linux 2.6.8)"
5534 msgstr ""
5535
5536 #.  This replaces the /proc/sys/kernel/rtsig-max system-wide limit
5537 #.  that was present in kernels <= 2.6.7.  MTK Dec 04
5538 #. type: Plain text
5539 #: build/C/man2/getrlimit.2:362
5540 msgid ""
5541 "Specifies the limit on the number of signals that may be queued for the real "
5542 "user ID of the calling process.  Both standard and real-time signals are "
5543 "counted for the purpose of checking this limit.  However, the limit is only "
5544 "enforced for B<sigqueue>(3); it is always possible to use B<kill>(2)  to "
5545 "queue one instance of any of the signals that are not already queued to the "
5546 "process."
5547 msgstr ""
5548
5549 #. type: TP
5550 #: build/C/man2/getrlimit.2:362
5551 #, no-wrap
5552 msgid "B<RLIMIT_STACK>"
5553 msgstr ""
5554
5555 #. type: Plain text
5556 #: build/C/man2/getrlimit.2:370
5557 msgid ""
5558 "The maximum size of the process stack, in bytes.  Upon reaching this limit, "
5559 "a B<SIGSEGV> signal is generated.  To handle this signal, a process must "
5560 "employ an alternate signal stack (B<sigaltstack>(2))."
5561 msgstr ""
5562
5563 #. type: Plain text
5564 #: build/C/man2/getrlimit.2:375
5565 msgid ""
5566 "Since Linux 2.6.23, this limit also determines the amount of space used for "
5567 "the process's command-line arguments and environment variables; for details, "
5568 "see B<execve>(2)."
5569 msgstr ""
5570
5571 #. type: SS
5572 #: build/C/man2/getrlimit.2:375
5573 #, no-wrap
5574 msgid "prlimit()"
5575 msgstr ""
5576
5577 #.  commit c022a0acad534fd5f5d5f17280f6d4d135e74e81
5578 #.  Author: Jiri Slaby <jslaby@suse.cz>
5579 #.  Date:   Tue May 4 18:03:50 2010 +0200
5580 #. type: Plain text
5581 #: build/C/man2/getrlimit.2:386
5582 msgid ""
5583 "The Linux-specific B<prlimit>()  system call combines and extends the "
5584 "functionality of B<setrlimit>()  and B<getrlimit>().  It can be used to both "
5585 "set and get the resource limits of an arbitrary process."
5586 msgstr ""
5587
5588 #. type: Plain text
5589 #: build/C/man2/getrlimit.2:393
5590 msgid ""
5591 "The I<resource> argument has the same meaning as for B<setrlimit>()  and "
5592 "B<getrlimit>()."
5593 msgstr ""
5594
5595 #. type: Plain text
5596 #: build/C/man2/getrlimit.2:411
5597 msgid ""
5598 "If the I<new_limit> argument is a not NULL, then the I<rlimit> structure to "
5599 "which it points is used to set new values for the soft and hard limits for "
5600 "I<resource>.  If the I<old_limit> argument is a not NULL, then a successful "
5601 "call to B<prlimit>()  places the previous soft and hard limits for "
5602 "I<resource> in the I<rlimit> structure pointed to by I<old_limit>."
5603 msgstr ""
5604
5605 #.  FIXME this permission check is strange
5606 #.  Asked about this on LKML, 7 Nov 2010
5607 #.      "Inconsistent credential checking in prlimit() syscall"
5608 #. type: Plain text
5609 #: build/C/man2/getrlimit.2:430
5610 msgid ""
5611 "The I<pid> argument specifies the ID of the process on which the call is to "
5612 "operate.  If I<pid> is 0, then the call applies to the calling process.  To "
5613 "set or get the resources of a process other than itself, the caller must "
5614 "have the B<CAP_SYS_RESOURCE> capability, or the real, effective, and saved "
5615 "set user IDs of the target process must match the real user ID of the caller "
5616 "I<and> the real, effective, and saved set group IDs of the target process "
5617 "must match the real group ID of the caller."
5618 msgstr ""
5619
5620 #. type: Plain text
5621 #: build/C/man2/getrlimit.2:435
5622 msgid ""
5623 "On success, these system calls return 0.  On error, -1 is returned, and "
5624 "I<errno> is set appropriately."
5625 msgstr ""
5626
5627 #. type: Plain text
5628 #: build/C/man2/getrlimit.2:440
5629 msgid ""
5630 "A pointer argument points to a location outside the accessible address "
5631 "space."
5632 msgstr ""
5633
5634 #. type: Plain text
5635 #: build/C/man2/getrlimit.2:452
5636 msgid ""
5637 "The value specified in I<resource> is not valid; or, for B<setrlimit>()  or "
5638 "B<prlimit>(): I<rlim-E<gt>rlim_cur> was greater than I<rlim-E<gt>rlim_max>."
5639 msgstr ""
5640
5641 #. type: Plain text
5642 #: build/C/man2/getrlimit.2:464
5643 msgid ""
5644 "An unprivileged process tried to raise the hard limit; the "
5645 "B<CAP_SYS_RESOURCE> capability is required to do this.  Or, the caller tried "
5646 "to increase the hard B<RLIMIT_NOFILE> limit above the current kernel maximum "
5647 "(B<NR_OPEN>).  Or, the calling process did not have permission to set limits "
5648 "for the process specified by I<pid>."
5649 msgstr ""
5650
5651 #. type: Plain text
5652 #: build/C/man2/getrlimit.2:468
5653 msgid "Could not find a process with the ID specified in I<pid>."
5654 msgstr ""
5655
5656 #. type: Plain text
5657 #: build/C/man2/getrlimit.2:473
5658 msgid ""
5659 "The B<prlimit>()  system call is available since Linux 2.6.36.  Library "
5660 "support is available since glibc 2.13."
5661 msgstr ""
5662
5663 #. type: Plain text
5664 #: build/C/man2/getrlimit.2:477
5665 msgid "B<getrlimit>(), B<setrlimit>(): SVr4, 4.3BSD, POSIX.1-2001."
5666 msgstr ""
5667
5668 #. type: Plain text
5669 #: build/C/man2/getrlimit.2:480
5670 msgid "B<prlimit>(): Linux-specific."
5671 msgstr ""
5672
5673 #. type: Plain text
5674 #: build/C/man2/getrlimit.2:496
5675 msgid ""
5676 "B<RLIMIT_MEMLOCK> and B<RLIMIT_NPROC> derive from BSD and are not specified "
5677 "in POSIX.1-2001; they are present on the BSDs and Linux, but on few other "
5678 "implementations.  B<RLIMIT_RSS> derives from BSD and is not specified in "
5679 "POSIX.1-2001; it is nevertheless present on most implementations.  "
5680 "B<RLIMIT_MSGQUEUE>, B<RLIMIT_NICE>, B<RLIMIT_RTPRIO>, B<RLIMIT_RTTIME>, and "
5681 "B<RLIMIT_SIGPENDING> are Linux-specific."
5682 msgstr ""
5683
5684 #. type: Plain text
5685 #: build/C/man2/getrlimit.2:502
5686 msgid ""
5687 "A child process created via B<fork>(2)  inherits its parent's resource "
5688 "limits.  Resource limits are preserved across B<execve>(2)."
5689 msgstr ""
5690
5691 #. type: Plain text
5692 #: build/C/man2/getrlimit.2:511
5693 msgid ""
5694 "One can set the resource limits of the shell using the built-in I<ulimit> "
5695 "command (I<limit> in B<csh>(1)).  The shell's resource limits are inherited "
5696 "by the processes that it creates to execute commands."
5697 msgstr ""
5698
5699 #. type: Plain text
5700 #: build/C/man2/getrlimit.2:520
5701 msgid ""
5702 "Ancient systems provided a B<vlimit>()  function with a similar purpose to "
5703 "B<setrlimit>().  For backward compatibility, glibc also provides "
5704 "B<vlimit>().  All new applications should be written using B<setrlimit>()."
5705 msgstr ""
5706
5707 #. type: Plain text
5708 #: build/C/man2/getrlimit.2:523
5709 msgid "The program below demonstrates the use of B<prlimit>()."
5710 msgstr ""
5711
5712 #. type: Plain text
5713 #: build/C/man2/getrlimit.2:532
5714 #, no-wrap
5715 msgid ""
5716 "#define _GNU_SOURCE\n"
5717 "#define _FILE_OFFSET_BITS 64\n"
5718 "#include E<lt>stdio.hE<gt>\n"
5719 "#include E<lt>time.hE<gt>\n"
5720 "#include E<lt>stdlib.hE<gt>\n"
5721 "#include E<lt>unistd.hE<gt>\n"
5722 "#include E<lt>sys/resource.hE<gt>\n"
5723 msgstr ""
5724
5725 #. type: Plain text
5726 #: build/C/man2/getrlimit.2:535
5727 #, no-wrap
5728 msgid ""
5729 "#define errExit(msg) \tdo { perror(msg); exit(EXIT_FAILURE); \\e\n"
5730 "                        } while (0)\n"
5731 msgstr ""
5732
5733 #. type: Plain text
5734 #: build/C/man2/getrlimit.2:542
5735 #, no-wrap
5736 msgid ""
5737 "int\n"
5738 "main(int argc, char *argv[])\n"
5739 "{\n"
5740 "    struct rlimit old, new;\n"
5741 "    struct rlimit *newp;\n"
5742 "    pid_t pid;\n"
5743 msgstr ""
5744
5745 #. type: Plain text
5746 #: build/C/man2/getrlimit.2:548
5747 #, no-wrap
5748 msgid ""
5749 "    if (!(argc == 2 || argc == 4)) {\n"
5750 "        fprintf(stderr, \"Usage: %s E<lt>pidE<gt> [E<lt>new-soft-limitE<gt> "
5751 "\"\n"
5752 "                \"E<lt>new-hard-limitE<gt>]\\en\", argv[0]);\n"
5753 "        exit(EXIT_FAILURE);\n"
5754 "    }\n"
5755 msgstr ""
5756
5757 #. type: Plain text
5758 #: build/C/man2/getrlimit.2:550
5759 #, no-wrap
5760 msgid "    pid = atoi(argv[1]);        /* PID of target process */\n"
5761 msgstr ""
5762
5763 #. type: Plain text
5764 #: build/C/man2/getrlimit.2:557
5765 #, no-wrap
5766 msgid ""
5767 "    newp = NULL;\n"
5768 "    if (argc == 4) {\n"
5769 "        new.rlim_cur = atoi(argv[2]);\n"
5770 "        new.rlim_max = atoi(argv[3]);\n"
5771 "        newp = &new;\n"
5772 "    }\n"
5773 msgstr ""
5774
5775 #. type: Plain text
5776 #: build/C/man2/getrlimit.2:560
5777 #, no-wrap
5778 msgid ""
5779 "    /* Set CPU time limit of target process; retrieve and display\n"
5780 "       previous limit */\n"
5781 msgstr ""
5782
5783 #. type: Plain text
5784 #: build/C/man2/getrlimit.2:565
5785 #, no-wrap
5786 msgid ""
5787 "    if (prlimit(pid, RLIMIT_CPU, newp, &old) == -1)\n"
5788 "        errExit(\"prlimit-1\");\n"
5789 "    printf(\"Previous limits: soft=%lld; hard=%lld\\en\",\n"
5790 "            (long long) old.rlim_cur, (long long) old.rlim_max);\n"
5791 msgstr ""
5792
5793 #. type: Plain text
5794 #: build/C/man2/getrlimit.2:567
5795 #, no-wrap
5796 msgid "    /* Retrieve and display new CPU time limit */\n"
5797 msgstr ""
5798
5799 #. type: Plain text
5800 #: build/C/man2/getrlimit.2:572
5801 #, no-wrap
5802 msgid ""
5803 "    if (prlimit(pid, RLIMIT_CPU, NULL, &old) == -1)\n"
5804 "        errExit(\"prlimit-2\");\n"
5805 "    printf(\"New limits: soft=%lld; hard=%lld\\en\",\n"
5806 "            (long long) old.rlim_cur, (long long) old.rlim_max);\n"
5807 msgstr ""
5808
5809 #. type: Plain text
5810 #: build/C/man2/getrlimit.2:575
5811 #, no-wrap
5812 msgid ""
5813 "    exit(EXIT_FAILURE);\n"
5814 "}\n"
5815 msgstr ""
5816
5817 #.  FIXME prlimit() does not suffer
5818 #.  https://bugzilla.kernel.org/show_bug.cgi?id=5042
5819 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=12201
5820 #. type: Plain text
5821 #: build/C/man2/getrlimit.2:588
5822 msgid ""
5823 "In older Linux kernels, the B<SIGXCPU> and B<SIGKILL> signals delivered when "
5824 "a process encountered the soft and hard B<RLIMIT_CPU> limits were delivered "
5825 "one (CPU) second later than they should have been.  This was fixed in kernel "
5826 "2.6.8."
5827 msgstr ""
5828
5829 #.  see http://marc.theaimsgroup.com/?l=linux-kernel&m=114008066530167&w=2
5830 #. type: Plain text
5831 #: build/C/man2/getrlimit.2:596
5832 msgid ""
5833 "In 2.6.x kernels before 2.6.17, a B<RLIMIT_CPU> limit of 0 is wrongly "
5834 "treated as \"no limit\" (like B<RLIM_INFINITY>).  Since Linux 2.6.17, "
5835 "setting a limit of 0 does have an effect, but is actually treated as a limit "
5836 "of 1 second."
5837 msgstr ""
5838
5839 #. type: Plain text
5840 #: build/C/man2/getrlimit.2:600
5841 msgid ""
5842 "A kernel bug means that B<RLIMIT_RTPRIO> does not work in kernel 2.6.12; the "
5843 "problem is fixed in kernel 2.6.13."
5844 msgstr ""
5845
5846 #.  see http://marc.theaimsgroup.com/?l=linux-kernel&m=112256338703880&w=2
5847 #. type: Plain text
5848 #: build/C/man2/getrlimit.2:611
5849 msgid ""
5850 "In kernel 2.6.12, there was an off-by-one mismatch between the priority "
5851 "ranges returned by B<getpriority>(2)  and B<RLIMIT_NICE>.  This had the "
5852 "effect that the actual ceiling for the nice value was calculated as I<19\\ "
5853 "-\\ rlim_cur>.  This was fixed in kernel 2.6.13."
5854 msgstr ""
5855
5856 #. type: Plain text
5857 #: build/C/man2/getrlimit.2:620
5858 msgid ""
5859 "Kernels before 2.4.22 did not diagnose the error B<EINVAL> for "
5860 "B<setrlimit>()  when I<rlim-E<gt>rlim_cur> was greater than "
5861 "I<rlim-E<gt>rlim_max>."
5862 msgstr ""
5863
5864 #. type: Plain text
5865 #: build/C/man2/getrlimit.2:637
5866 msgid ""
5867 "B<dup>(2), B<fcntl>(2), B<fork>(2), B<getrusage>(2), B<mlock>(2), "
5868 "B<mmap>(2), B<open>(2), B<quotactl>(2), B<sbrk>(2), B<shmctl>(2), "
5869 "B<malloc>(3), B<sigqueue>(3), B<ulimit>(3), B<core>(5), B<capabilities>(7), "
5870 "B<signal>(7)"
5871 msgstr ""
5872
5873 #. type: TH
5874 #: build/C/man2/getrusage.2:39
5875 #, no-wrap
5876 msgid "GETRUSAGE"
5877 msgstr ""
5878
5879 #. type: TH
5880 #: build/C/man2/getrusage.2:39 build/C/man2/getsid.2:25 build/C/man2/setpgid.2:46
5881 #, no-wrap
5882 msgid "2010-09-26"
5883 msgstr ""
5884
5885 #. type: Plain text
5886 #: build/C/man2/getrusage.2:42
5887 msgid "getrusage - get resource usage"
5888 msgstr ""
5889
5890 #. type: Plain text
5891 #: build/C/man2/getrusage.2:48
5892 msgid "B<int getrusage(int >I<who>B<, struct rusage *>I<usage>B<);>"
5893 msgstr ""
5894
5895 #. type: Plain text
5896 #: build/C/man2/getrusage.2:54
5897 msgid ""
5898 "B<getrusage>()  returns resource usage measures for I<who>, which can be one "
5899 "of the following:"
5900 msgstr ""
5901
5902 #. type: TP
5903 #: build/C/man2/getrusage.2:54
5904 #, no-wrap
5905 msgid "B<RUSAGE_SELF>"
5906 msgstr ""
5907
5908 #. type: Plain text
5909 #: build/C/man2/getrusage.2:58
5910 msgid ""
5911 "Return resource usage statistics for the calling process, which is the sum "
5912 "of resources used by all threads in the process."
5913 msgstr ""
5914
5915 #. type: TP
5916 #: build/C/man2/getrusage.2:58
5917 #, no-wrap
5918 msgid "B<RUSAGE_CHILDREN>"
5919 msgstr ""
5920
5921 #. type: Plain text
5922 #: build/C/man2/getrusage.2:65
5923 msgid ""
5924 "Return resource usage statistics for all children of the calling process "
5925 "that have terminated and been waited for.  These statistics will include the "
5926 "resources used by grandchildren, and further removed descendants, if all of "
5927 "the intervening descendants waited on their terminated children."
5928 msgstr ""
5929
5930 #. type: TP
5931 #: build/C/man2/getrusage.2:65
5932 #, no-wrap
5933 msgid "B<RUSAGE_THREAD> (since Linux 2.6.26)"
5934 msgstr ""
5935
5936 #. type: Plain text
5937 #: build/C/man2/getrusage.2:68
5938 msgid "Return resource usage statistics for the calling thread."
5939 msgstr ""
5940
5941 #. type: Plain text
5942 #: build/C/man2/getrusage.2:72
5943 msgid ""
5944 "The resource usages are returned in the structure pointed to by I<usage>, "
5945 "which has the following form:"
5946 msgstr ""
5947
5948 #. type: Plain text
5949 #: build/C/man2/getrusage.2:93
5950 #, no-wrap
5951 msgid ""
5952 "struct rusage {\n"
5953 "    struct timeval ru_utime; /* user CPU time used */\n"
5954 "    struct timeval ru_stime; /* system CPU time used */\n"
5955 "    long   ru_maxrss;        /* maximum resident set size */\n"
5956 "    long   ru_ixrss;         /* integral shared memory size */\n"
5957 "    long   ru_idrss;         /* integral unshared data size */\n"
5958 "    long   ru_isrss;         /* integral unshared stack size */\n"
5959 "    long   ru_minflt;        /* page reclaims (soft page faults) */\n"
5960 "    long   ru_majflt;        /* page faults (hard page faults) */\n"
5961 "    long   ru_nswap;         /* swaps */\n"
5962 "    long   ru_inblock;       /* block input operations */\n"
5963 "    long   ru_oublock;       /* block output operations */\n"
5964 "    long   ru_msgsnd;        /* IPC messages sent */\n"
5965 "    long   ru_msgrcv;        /* IPC messages received */\n"
5966 "    long   ru_nsignals;      /* signals received */\n"
5967 "    long   ru_nvcsw;         /* voluntary context switches */\n"
5968 "    long   ru_nivcsw;        /* involuntary context switches */\n"
5969 "};\n"
5970 msgstr ""
5971
5972 #. type: Plain text
5973 #: build/C/man2/getrusage.2:101
5974 msgid ""
5975 "Not all fields are completed; unmaintained fields are set to zero by the "
5976 "kernel.  (The unmaintained fields are provided for compatibility with other "
5977 "systems, and because they may one day be supported on Linux.)  The fields "
5978 "are interpreted as follows:"
5979 msgstr ""
5980
5981 #. type: TP
5982 #: build/C/man2/getrusage.2:101
5983 #, no-wrap
5984 msgid "I<ru_utime>"
5985 msgstr ""
5986
5987 #. type: Plain text
5988 #: build/C/man2/getrusage.2:107
5989 msgid ""
5990 "This is the total amount of time spent executing in user mode, expressed in "
5991 "a I<timeval> structure (seconds plus microseconds)."
5992 msgstr ""
5993
5994 #. type: TP
5995 #: build/C/man2/getrusage.2:107
5996 #, no-wrap
5997 msgid "I<ru_stime>"
5998 msgstr ""
5999
6000 #. type: Plain text
6001 #: build/C/man2/getrusage.2:113
6002 msgid ""
6003 "This is the total amount of time spent executing in kernel mode, expressed "
6004 "in a I<timeval> structure (seconds plus microseconds)."
6005 msgstr ""
6006
6007 #. type: TP
6008 #: build/C/man2/getrusage.2:113
6009 #, no-wrap
6010 msgid "I<ru_maxrss> (since Linux 2.6.32)"
6011 msgstr ""
6012
6013 #. type: Plain text
6014 #: build/C/man2/getrusage.2:119
6015 msgid ""
6016 "This is the maximum resident set size used (in kilobytes). For "
6017 "B<RUSAGE_CHILDREN>, this is the resident set size of the largest child, not "
6018 "the maximum resident set size of the process tree."
6019 msgstr ""
6020
6021 #. type: TP
6022 #: build/C/man2/getrusage.2:119
6023 #, no-wrap
6024 msgid "I<ru_ixrss> (unmaintained)"
6025 msgstr ""
6026
6027 #.  On some systems, this field records the number of signals received.
6028 #. type: Plain text
6029 #: build/C/man2/getrusage.2:125 build/C/man2/getrusage.2:130 build/C/man2/getrusage.2:135 build/C/man2/getrusage.2:147 build/C/man2/getrusage.2:159 build/C/man2/getrusage.2:165 build/C/man2/getrusage.2:169
6030 msgid "This field is currently unused on Linux."
6031 msgstr ""
6032
6033 #. type: TP
6034 #: build/C/man2/getrusage.2:125
6035 #, no-wrap
6036 msgid "I<ru_idrss> (unmaintained)"
6037 msgstr ""
6038
6039 #. type: TP
6040 #: build/C/man2/getrusage.2:130
6041 #, no-wrap
6042 msgid "I<ru_isrss> (unmaintained)"
6043 msgstr ""
6044
6045 #. type: TP
6046 #: build/C/man2/getrusage.2:135
6047 #, no-wrap
6048 msgid "I<ru_minflt>"
6049 msgstr ""
6050
6051 #. type: Plain text
6052 #: build/C/man2/getrusage.2:140
6053 msgid ""
6054 "The number of page faults serviced without any I/O activity; here I/O "
6055 "activity is avoided by ``reclaiming'' a page frame from the list of pages "
6056 "awaiting reallocation."
6057 msgstr ""
6058
6059 #. type: TP
6060 #: build/C/man2/getrusage.2:140
6061 #, no-wrap
6062 msgid "I<ru_majflt>"
6063 msgstr ""
6064
6065 #. type: Plain text
6066 #: build/C/man2/getrusage.2:143
6067 msgid "The number of page faults serviced that required I/O activity."
6068 msgstr ""
6069
6070 #. type: TP
6071 #: build/C/man2/getrusage.2:143
6072 #, no-wrap
6073 msgid "I<ru_nswap> (unmaintained)"
6074 msgstr ""
6075
6076 #. type: TP
6077 #: build/C/man2/getrusage.2:147
6078 #, no-wrap
6079 msgid "I<ru_inblock> (since Linux 2.6.22)"
6080 msgstr ""
6081
6082 #. type: Plain text
6083 #: build/C/man2/getrusage.2:150
6084 msgid "The number of times the file system had to perform input."
6085 msgstr ""
6086
6087 #. type: TP
6088 #: build/C/man2/getrusage.2:150
6089 #, no-wrap
6090 msgid "I<ru_oublock> (since Linux 2.6.22)"
6091 msgstr ""
6092
6093 #. type: Plain text
6094 #: build/C/man2/getrusage.2:153
6095 msgid "The number of times the file system had to perform output."
6096 msgstr ""
6097
6098 #. type: TP
6099 #: build/C/man2/getrusage.2:153
6100 #, no-wrap
6101 msgid "I<ru_msgsnd> (unmaintained)"
6102 msgstr ""
6103
6104 #. type: TP
6105 #: build/C/man2/getrusage.2:159
6106 #, no-wrap
6107 msgid "I<ru_msgrcv> (unmaintained)"
6108 msgstr ""
6109
6110 #. type: TP
6111 #: build/C/man2/getrusage.2:165
6112 #, no-wrap
6113 msgid "I<ru_nsignals> (unmaintained)"
6114 msgstr ""
6115
6116 #. type: TP
6117 #: build/C/man2/getrusage.2:169
6118 #, no-wrap
6119 msgid "I<ru_nvcsw> (since Linux 2.6)"
6120 msgstr ""
6121
6122 #. type: Plain text
6123 #: build/C/man2/getrusage.2:174
6124 msgid ""
6125 "The number of times a context switch resulted due to a process voluntarily "
6126 "giving up the processor before its time slice was completed (usually to "
6127 "await availability of a resource)."
6128 msgstr ""
6129
6130 #. type: TP
6131 #: build/C/man2/getrusage.2:174
6132 #, no-wrap
6133 msgid "I<ru_nivcsw> (since Linux 2.6)"
6134 msgstr ""
6135
6136 #. type: Plain text
6137 #: build/C/man2/getrusage.2:179
6138 msgid ""
6139 "The number of times a context switch resulted due to a higher priority "
6140 "process becoming runnable or because the current process exceeded its time "
6141 "slice."
6142 msgstr ""
6143
6144 #. type: Plain text
6145 #: build/C/man2/getrusage.2:190
6146 msgid "I<usage> points outside the accessible address space."
6147 msgstr ""
6148
6149 #. type: Plain text
6150 #: build/C/man2/getrusage.2:194
6151 msgid "I<who> is invalid."
6152 msgstr ""
6153
6154 #. type: Plain text
6155 #: build/C/man2/getrusage.2:202
6156 msgid ""
6157 "SVr4, 4.3BSD.  POSIX.1-2001 specifies B<getrusage>(), but only specifies the "
6158 "fields I<ru_utime> and I<ru_stime>."
6159 msgstr ""
6160
6161 #. type: Plain text
6162 #: build/C/man2/getrusage.2:205
6163 msgid "B<RUSAGE_THREAD> is Linux-specific."
6164 msgstr ""
6165
6166 #. type: Plain text
6167 #: build/C/man2/getrusage.2:208
6168 msgid "Resource usage metrics are preserved across an B<execve>(2)."
6169 msgstr ""
6170
6171 #. type: Plain text
6172 #: build/C/man2/getrusage.2:216
6173 msgid ""
6174 "Including I<E<lt>sys/time.hE<gt>> is not required these days, but increases "
6175 "portability.  (Indeed, I<struct timeval> is defined in "
6176 "I<E<lt>sys/time.hE<gt>>.)"
6177 msgstr ""
6178
6179 #.  See the description of getrusage() in XSH.
6180 #.  A similar statement was also in SUSv2.
6181 #. type: Plain text
6182 #: build/C/man2/getrusage.2:228
6183 msgid ""
6184 "In Linux kernel versions before 2.6.9, if the disposition of B<SIGCHLD> is "
6185 "set to B<SIG_IGN> then the resource usages of child processes are "
6186 "automatically included in the value returned by B<RUSAGE_CHILDREN>, although "
6187 "POSIX.1-2001 explicitly prohibits this.  This nonconformance is rectified in "
6188 "Linux 2.6.9 and later."
6189 msgstr ""
6190
6191 #. type: Plain text
6192 #: build/C/man2/getrusage.2:231
6193 msgid ""
6194 "The structure definition shown at the start of this page was taken from "
6195 "4.3BSD Reno."
6196 msgstr ""
6197
6198 #. type: Plain text
6199 #: build/C/man2/getrusage.2:240
6200 msgid ""
6201 "Ancient systems provided a B<vtimes>()  function with a similar purpose to "
6202 "B<getrusage>().  For backward compatibility, glibc also provides "
6203 "B<vtimes>().  All new applications should be written using B<getrusage>()."
6204 msgstr ""
6205
6206 #. type: Plain text
6207 #: build/C/man2/getrusage.2:245
6208 msgid "See also the description of I</proc/PID/stat> in B<proc>(5)."
6209 msgstr ""
6210
6211 #. type: Plain text
6212 #: build/C/man2/getrusage.2:252
6213 msgid ""
6214 "B<clock_gettime>(2), B<getrlimit>(2), B<times>(2), B<wait>(2), B<wait4>(2), "
6215 "B<clock>(3)"
6216 msgstr ""
6217
6218 #. type: TH
6219 #: build/C/man2/getsid.2:25
6220 #, no-wrap
6221 msgid "GETSID"
6222 msgstr ""
6223
6224 #. type: Plain text
6225 #: build/C/man2/getsid.2:28
6226 msgid "getsid - get session ID"
6227 msgstr ""
6228
6229 #. type: Plain text
6230 #: build/C/man2/getsid.2:32
6231 msgid "B<pid_t getsid(pid_t>I< pid>B<);>"
6232 msgstr ""
6233
6234 #. type: Plain text
6235 #: build/C/man2/getsid.2:41
6236 msgid "B<getsid>():"
6237 msgstr ""
6238
6239 #. type: Plain text
6240 #: build/C/man2/getsid.2:44 build/C/man2/setpgid.2:77
6241 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
6242 msgstr ""
6243
6244 #. type: Plain text
6245 #: build/C/man2/getsid.2:46 build/C/man2/setpgid.2:79
6246 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
6247 msgstr ""
6248
6249 #. type: Plain text
6250 #: build/C/man2/getsid.2:57
6251 msgid ""
6252 "I<getsid(0)> returns the session ID of the calling process.  I<getsid(p)> "
6253 "returns the session ID of the process with process ID I<p>.  (The session ID "
6254 "of a process is the process group ID of the session leader.)"
6255 msgstr ""
6256
6257 #. type: Plain text
6258 #: build/C/man2/getsid.2:62
6259 msgid ""
6260 "On success, a session ID is returned.  On error, I<(pid_t)\\ -1> will be "
6261 "returned, and I<errno> is set appropriately."
6262 msgstr ""
6263
6264 #. type: Plain text
6265 #: build/C/man2/getsid.2:69
6266 msgid ""
6267 "A process with process ID I<p> exists, but it is not in the same session as "
6268 "the calling process, and the implementation considers this an error."
6269 msgstr ""
6270
6271 #. type: Plain text
6272 #: build/C/man2/getsid.2:74
6273 msgid "No process with process ID I<p> was found."
6274 msgstr ""
6275
6276 #.  Linux has this system call since Linux 1.3.44.
6277 #.  There is libc support since libc 5.2.19.
6278 #. type: Plain text
6279 #: build/C/man2/getsid.2:78
6280 msgid "This system call is available on Linux since version 2.0."
6281 msgstr ""
6282
6283 #. type: Plain text
6284 #: build/C/man2/getsid.2:80 build/C/man2/setgid.2:76 build/C/man2/setsid.2:66
6285 msgid "SVr4, POSIX.1-2001."
6286 msgstr ""
6287
6288 #. type: Plain text
6289 #: build/C/man2/getsid.2:83
6290 msgid "Linux does not return B<EPERM>."
6291 msgstr ""
6292
6293 #. type: Plain text
6294 #: build/C/man2/getsid.2:87
6295 msgid "B<getpgid>(2), B<setsid>(2), B<credentials>(7)"
6296 msgstr ""
6297
6298 #. type: TH
6299 #: build/C/man2/getuid.2:26
6300 #, no-wrap
6301 msgid "GETUID"
6302 msgstr ""
6303
6304 #. type: Plain text
6305 #: build/C/man2/getuid.2:29
6306 msgid "getuid, geteuid - get user identity"
6307 msgstr ""
6308
6309 #. type: Plain text
6310 #: build/C/man2/getuid.2:35
6311 msgid "B<uid_t getuid(void);>"
6312 msgstr ""
6313
6314 #. type: Plain text
6315 #: build/C/man2/getuid.2:37
6316 msgid "B<uid_t geteuid(void);>"
6317 msgstr ""
6318
6319 #. type: Plain text
6320 #: build/C/man2/getuid.2:40
6321 msgid "B<getuid>()  returns the real user ID of the calling process."
6322 msgstr ""
6323
6324 #. type: Plain text
6325 #: build/C/man2/getuid.2:43
6326 msgid "B<geteuid>()  returns the effective user ID of the calling process."
6327 msgstr ""
6328
6329 #. type: SS
6330 #: build/C/man2/getuid.2:48
6331 #, no-wrap
6332 msgid "History"
6333 msgstr ""
6334
6335 #. type: Plain text
6336 #: build/C/man2/getuid.2:57
6337 msgid ""
6338 "In UNIX V6 the B<getuid>()  call returned I<(euid E<lt>E<lt> 8) + uid>.  "
6339 "UNIX V7 introduced separate calls B<getuid>()  and B<geteuid>()."
6340 msgstr ""
6341
6342 #. type: Plain text
6343 #: build/C/man2/getuid.2:73
6344 msgid ""
6345 "The original Linux B<getuid>()  and B<geteuid>()  system calls supported "
6346 "only 16-bit user IDs.  Subsequently, Linux 2.4 added B<getuid32>()  and "
6347 "B<geteuid32>(), supporting 32-bit IDs.  The glibc B<getuid>()  and "
6348 "B<geteuid>()  wrapper functions transparently deal with the variations "
6349 "across kernel versions."
6350 msgstr ""
6351
6352 #. type: Plain text
6353 #: build/C/man2/getuid.2:78
6354 msgid "B<getresuid>(2), B<setreuid>(2), B<setuid>(2), B<credentials>(7)"
6355 msgstr ""
6356
6357 #. type: TH
6358 #: build/C/man2/iopl.2:33
6359 #, no-wrap
6360 msgid "IOPL"
6361 msgstr ""
6362
6363 #. type: TH
6364 #: build/C/man2/iopl.2:33
6365 #, no-wrap
6366 msgid "2004-05-27"
6367 msgstr ""
6368
6369 #. type: Plain text
6370 #: build/C/man2/iopl.2:36
6371 msgid "iopl - change I/O privilege level"
6372 msgstr ""
6373
6374 #. type: Plain text
6375 #: build/C/man2/iopl.2:38
6376 msgid "B<#include E<lt>sys/io.hE<gt>>"
6377 msgstr ""
6378
6379 #. type: Plain text
6380 #: build/C/man2/iopl.2:40
6381 msgid "B<int iopl(int >I<level>B<);>"
6382 msgstr ""
6383
6384 #. type: Plain text
6385 #: build/C/man2/iopl.2:44
6386 msgid ""
6387 "B<iopl>()  changes the I/O privilege level of the calling process, as "
6388 "specified in I<level>."
6389 msgstr ""
6390
6391 #. type: Plain text
6392 #: build/C/man2/iopl.2:50
6393 msgid ""
6394 "This call is necessary to allow 8514-compatible X servers to run under "
6395 "Linux.  Since these X servers require access to all 65536 I/O ports, the "
6396 "B<ioperm>(2)  call is not sufficient."
6397 msgstr ""
6398
6399 #. type: Plain text
6400 #: build/C/man2/iopl.2:54
6401 msgid ""
6402 "In addition to granting unrestricted I/O port access, running at a higher "
6403 "I/O privilege level also allows the process to disable interrupts.  This "
6404 "will probably crash the system, and is not recommended."
6405 msgstr ""
6406
6407 #. type: Plain text
6408 #: build/C/man2/iopl.2:59
6409 msgid "Permissions are inherited by B<fork>(2)  and B<execve>(2)."
6410 msgstr ""
6411
6412 #. type: Plain text
6413 #: build/C/man2/iopl.2:61
6414 msgid "The I/O privilege level for a normal process is 0."
6415 msgstr ""
6416
6417 #. type: Plain text
6418 #: build/C/man2/iopl.2:65
6419 msgid ""
6420 "This call is mostly for the i386 architecture.  On many other architectures "
6421 "it does not exist or will always return an error."
6422 msgstr ""
6423
6424 #. type: Plain text
6425 #: build/C/man2/iopl.2:75
6426 msgid "I<level> is greater than 3."
6427 msgstr ""
6428
6429 #. type: Plain text
6430 #: build/C/man2/iopl.2:78
6431 msgid "This call is unimplemented."
6432 msgstr ""
6433
6434 #. type: Plain text
6435 #: build/C/man2/iopl.2:85
6436 msgid ""
6437 "The calling process has insufficient privilege to call B<iopl>(); the "
6438 "B<CAP_SYS_RAWIO> capability is required."
6439 msgstr ""
6440
6441 #. type: Plain text
6442 #: build/C/man2/iopl.2:89
6443 msgid ""
6444 "B<iopl>()  is Linux-specific and should not be used in processes intended to "
6445 "be portable."
6446 msgstr ""
6447
6448 #. type: Plain text
6449 #: build/C/man2/iopl.2:98
6450 msgid ""
6451 "Libc5 treats it as a system call and has a prototype in "
6452 "I<E<lt>unistd.hE<gt>>.  Glibc1 does not have a prototype.  Glibc2 has a "
6453 "prototype both in I<E<lt>sys/io.hE<gt>> and in I<E<lt>sys/perm.hE<gt>>.  "
6454 "Avoid the latter, it is available on i386 only."
6455 msgstr ""
6456
6457 #. type: Plain text
6458 #: build/C/man2/iopl.2:101
6459 msgid "B<ioperm>(2), B<capabilities>(7)"
6460 msgstr ""
6461
6462 #. type: TH
6463 #: build/C/man2/ioprio_set.2:25
6464 #, no-wrap
6465 msgid "IOPRIO_SET"
6466 msgstr ""
6467
6468 #. type: TH
6469 #: build/C/man2/ioprio_set.2:25
6470 #, no-wrap
6471 msgid "2008-07-09"
6472 msgstr ""
6473
6474 #. type: Plain text
6475 #: build/C/man2/ioprio_set.2:28
6476 msgid "ioprio_get, ioprio_set - get/set I/O scheduling class and priority"
6477 msgstr ""
6478
6479 #. type: Plain text
6480 #: build/C/man2/ioprio_set.2:32
6481 #, no-wrap
6482 msgid ""
6483 "B<int ioprio_get(int >I<which>B<, int >I<who>B<);>\n"
6484 "B<int ioprio_set(int >I<which>B<, int >I<who>B<, int >I<ioprio>B<);>\n"
6485 msgstr ""
6486
6487 #. type: Plain text
6488 #: build/C/man2/ioprio_set.2:40
6489 msgid ""
6490 "The B<ioprio_get>()  and B<ioprio_set>()  system calls respectively get and "
6491 "set the I/O scheduling class and priority of one or more processes."
6492 msgstr ""
6493
6494 #. type: Plain text
6495 #: build/C/man2/ioprio_set.2:52
6496 msgid ""
6497 "The I<which> and I<who> arguments identify the process(es) on which the "
6498 "system calls operate.  The I<which> argument determines how I<who> is "
6499 "interpreted, and has one of the following values:"
6500 msgstr ""
6501
6502 #. type: TP
6503 #: build/C/man2/ioprio_set.2:52
6504 #, no-wrap
6505 msgid "B<IOPRIO_WHO_PROCESS>"
6506 msgstr ""
6507
6508 #. type: Plain text
6509 #: build/C/man2/ioprio_set.2:56
6510 msgid "I<who> is a process ID identifying a single process."
6511 msgstr ""
6512
6513 #. type: TP
6514 #: build/C/man2/ioprio_set.2:56
6515 #, no-wrap
6516 msgid "B<IOPRIO_WHO_PGRP>"
6517 msgstr ""
6518
6519 #. type: Plain text
6520 #: build/C/man2/ioprio_set.2:60
6521 msgid "I<who> is a process group ID identifying all the members of a process group."
6522 msgstr ""
6523
6524 #. type: TP
6525 #: build/C/man2/ioprio_set.2:60
6526 #, no-wrap
6527 msgid "B<IOPRIO_WHO_USER>"
6528 msgstr ""
6529
6530 #. type: Plain text
6531 #: build/C/man2/ioprio_set.2:65
6532 msgid ""
6533 "I<who> is a user ID identifying all of the processes that have a matching "
6534 "real UID."
6535 msgstr ""
6536
6537 #. type: Plain text
6538 #: build/C/man2/ioprio_set.2:88
6539 msgid ""
6540 "If I<which> is specified as B<IOPRIO_WHO_PGRP> or B<IOPRIO_WHO_USER> when "
6541 "calling B<ioprio_get>(), and more than one process matches I<who>, then the "
6542 "returned priority will be the highest one found among all of the matching "
6543 "processes.  One priority is said to be higher than another one if it belongs "
6544 "to a higher priority class (B<IOPRIO_CLASS_RT> is the highest priority "
6545 "class; B<IOPRIO_CLASS_IDLE> is the lowest)  or if it belongs to the same "
6546 "priority class as the other process but has a higher priority level (a lower "
6547 "priority number means a higher priority level)."
6548 msgstr ""
6549
6550 #. type: Plain text
6551 #: build/C/man2/ioprio_set.2:98
6552 msgid ""
6553 "The I<ioprio> argument given to B<ioprio_set>()  is a bit mask that "
6554 "specifies both the scheduling class and the priority to be assigned to the "
6555 "target process(es).  The following macros are used for assembling and "
6556 "dissecting I<ioprio> values:"
6557 msgstr ""
6558
6559 #. type: TP
6560 #: build/C/man2/ioprio_set.2:98
6561 #, no-wrap
6562 msgid "B<IOPRIO_PRIO_VALUE(>I<class>B<, >I<data>B<)>"
6563 msgstr ""
6564
6565 #. type: Plain text
6566 #: build/C/man2/ioprio_set.2:107
6567 msgid ""
6568 "Given a scheduling I<class> and priority (I<data>), this macro combines the "
6569 "two values to produce an I<ioprio> value, which is returned as the result of "
6570 "the macro."
6571 msgstr ""
6572
6573 #. type: TP
6574 #: build/C/man2/ioprio_set.2:107
6575 #, no-wrap
6576 msgid "B<IOPRIO_PRIO_CLASS(>I<mask>B<)>"
6577 msgstr ""
6578
6579 #. type: Plain text
6580 #: build/C/man2/ioprio_set.2:119
6581 msgid ""
6582 "Given I<mask> (an I<ioprio> value), this macro returns its I/O class "
6583 "component, that is, one of the values B<IOPRIO_CLASS_RT>, "
6584 "B<IOPRIO_CLASS_BE>, or B<IOPRIO_CLASS_IDLE>."
6585 msgstr ""
6586
6587 #. type: TP
6588 #: build/C/man2/ioprio_set.2:119
6589 #, no-wrap
6590 msgid "B<IOPRIO_PRIO_DATA(>I<mask>B<)>"
6591 msgstr ""
6592
6593 #. type: Plain text
6594 #: build/C/man2/ioprio_set.2:128
6595 msgid ""
6596 "Given I<mask> (an I<ioprio> value), this macro returns its priority "
6597 "(I<data>)  component."
6598 msgstr ""
6599
6600 #. type: Plain text
6601 #: build/C/man2/ioprio_set.2:131
6602 msgid ""
6603 "See the NOTES section for more information on scheduling classes and "
6604 "priorities."
6605 msgstr ""
6606
6607 #. type: Plain text
6608 #: build/C/man2/ioprio_set.2:139
6609 msgid ""
6610 "I/O priorities are supported for reads and for synchronous (B<O_DIRECT>, "
6611 "B<O_SYNC>)  writes.  I/O priorities are not supported for asynchronous "
6612 "writes because they are issued outside the context of the program dirtying "
6613 "the memory, and thus program-specific priorities do not apply."
6614 msgstr ""
6615
6616 #. type: Plain text
6617 #: build/C/man2/ioprio_set.2:152
6618 msgid ""
6619 "On success, B<ioprio_get>()  returns the I<ioprio> value of the process with "
6620 "highest I/O priority of any of the processes that match the criteria "
6621 "specified in I<which> and I<who>.  On error, -1 is returned, and I<errno> is "
6622 "set to indicate the error."
6623 msgstr ""
6624
6625 #. type: Plain text
6626 #: build/C/man2/ioprio_set.2:159
6627 msgid ""
6628 "On success, B<ioprio_set>()  returns 0.  On error, -1 is returned, and "
6629 "I<errno> is set to indicate the error."
6630 msgstr ""
6631
6632 #. type: Plain text
6633 #: build/C/man2/ioprio_set.2:169
6634 msgid ""
6635 "Invalid value for I<which> or I<ioprio>.  Refer to the NOTES section for "
6636 "available scheduler classes and priority levels for I<ioprio>."
6637 msgstr ""
6638
6639 #. type: Plain text
6640 #: build/C/man2/ioprio_set.2:177
6641 msgid ""
6642 "The calling process does not have the privilege needed to assign this "
6643 "I<ioprio> to the specified process(es).  See the NOTES section for more "
6644 "information on required privileges for B<ioprio_set>()."
6645 msgstr ""
6646
6647 #. type: Plain text
6648 #: build/C/man2/ioprio_set.2:183
6649 msgid ""
6650 "No process(es) could be found that matched the specification in I<which> and "
6651 "I<who>."
6652 msgstr ""
6653
6654 #. type: Plain text
6655 #: build/C/man2/ioprio_set.2:186
6656 msgid "These system calls have been available on Linux since kernel 2.6.13."
6657 msgstr ""
6658
6659 #. type: Plain text
6660 #: build/C/man2/ioprio_set.2:191
6661 msgid ""
6662 "Glibc does not provide wrapper for these system calls; call them using "
6663 "B<syscall>(2)."
6664 msgstr ""
6665
6666 #. type: Plain text
6667 #: build/C/man2/ioprio_set.2:196
6668 msgid ""
6669 "These system calls only have an effect when used in conjunction with an I/O "
6670 "scheduler that supports I/O priorities.  As at kernel 2.6.17 the only such "
6671 "scheduler is the Completely Fair Queuing (CFQ) I/O scheduler."
6672 msgstr ""
6673
6674 #. type: SS
6675 #: build/C/man2/ioprio_set.2:196
6676 #, no-wrap
6677 msgid "Selecting an I/O Scheduler"
6678 msgstr ""
6679
6680 #. type: Plain text
6681 #: build/C/man2/ioprio_set.2:200
6682 msgid ""
6683 "I/O Schedulers are selected on a per-device basis via the special file "
6684 "I</sys/block/E<lt>deviceE<gt>/queue/scheduler>."
6685 msgstr ""
6686
6687 #. type: Plain text
6688 #: build/C/man2/ioprio_set.2:206
6689 msgid ""
6690 "One can view the current I/O scheduler via the I</sys> file system.  For "
6691 "example, the following command displays a list of all schedulers currently "
6692 "loaded in the kernel:"
6693 msgstr ""
6694
6695 #. type: Plain text
6696 #: build/C/man2/ioprio_set.2:211
6697 #, no-wrap
6698 msgid ""
6699 "$B< cat /sys/block/hda/queue/scheduler>\n"
6700 "noop anticipatory deadline [cfq]\n"
6701 msgstr ""
6702
6703 #. type: Plain text
6704 #: build/C/man2/ioprio_set.2:225
6705 msgid ""
6706 "The scheduler surrounded by brackets is the one actually in use for the "
6707 "device (I<hda> in the example).  Setting another scheduler is done by "
6708 "writing the name of the new scheduler to this file.  For example, the "
6709 "following command will set the scheduler for the I<hda> device to I<cfq>:"
6710 msgstr ""
6711
6712 #. type: Plain text
6713 #: build/C/man2/ioprio_set.2:231
6714 #, no-wrap
6715 msgid ""
6716 "$B< su>\n"
6717 "Password:\n"
6718 "#B< echo cfq E<gt> /sys/block/hda/queue/scheduler>\n"
6719 msgstr ""
6720
6721 #. type: SS
6722 #: build/C/man2/ioprio_set.2:233
6723 #, no-wrap
6724 msgid "The Completely Fair Queuing (CFQ) I/O Scheduler"
6725 msgstr ""
6726
6727 #. type: Plain text
6728 #: build/C/man2/ioprio_set.2:239
6729 msgid ""
6730 "Since v3 (aka CFQ Time Sliced) CFQ implements I/O nice levels similar to "
6731 "those of CPU scheduling.  These nice levels are grouped in three scheduling "
6732 "classes each one containing one or more priority levels:"
6733 msgstr ""
6734
6735 #. type: TP
6736 #: build/C/man2/ioprio_set.2:239
6737 #, no-wrap
6738 msgid "B<IOPRIO_CLASS_RT> (1)"
6739 msgstr ""
6740
6741 #. type: Plain text
6742 #: build/C/man2/ioprio_set.2:254
6743 msgid ""
6744 "This is the real-time I/O class.  This scheduling class is given higher "
6745 "priority than any other class: processes from this class are given first "
6746 "access to the disk every time.  Thus this I/O class needs to be used with "
6747 "some care: one I/O real-time process can starve the entire system.  Within "
6748 "the real-time class, there are 8 levels of class data (priority) that "
6749 "determine exactly how much time this process needs the disk for on each "
6750 "service.  The highest real-time priority level is 0; the lowest is 7.  In "
6751 "the future this might change to be more directly mappable to performance, by "
6752 "passing in a desired data rate instead."
6753 msgstr ""
6754
6755 #. type: TP
6756 #: build/C/man2/ioprio_set.2:254
6757 #, no-wrap
6758 msgid "B<IOPRIO_CLASS_BE> (2)"
6759 msgstr ""
6760
6761 #. type: Plain text
6762 #: build/C/man2/ioprio_set.2:267
6763 msgid ""
6764 "This is the best-effort scheduling class, which is the default for any "
6765 "process that hasn't set a specific I/O priority.  The class data (priority) "
6766 "determines how much I/O bandwidth the process will get.  Best-effort "
6767 "priority levels are analogous to CPU nice values (see B<getpriority>(2)).  "
6768 "The priority level determines a priority relative to other processes in the "
6769 "best-effort scheduling class.  Priority levels range from 0 (highest) to 7 "
6770 "(lowest)."
6771 msgstr ""
6772
6773 #. type: TP
6774 #: build/C/man2/ioprio_set.2:267
6775 #, no-wrap
6776 msgid "B<IOPRIO_CLASS_IDLE> (3)"
6777 msgstr ""
6778
6779 #. type: Plain text
6780 #: build/C/man2/ioprio_set.2:276
6781 msgid ""
6782 "This is the idle scheduling class.  Processes running at this level only get "
6783 "I/O time when no-one else needs the disk.  The idle class has no class "
6784 "data.  Attention is required when assigning this priority class to a "
6785 "process, since it may become starved if higher priority processes are "
6786 "constantly accessing the disk."
6787 msgstr ""
6788
6789 #. type: Plain text
6790 #: build/C/man2/ioprio_set.2:280
6791 msgid ""
6792 "Refer to I<Documentation/block/ioprio.txt> for more information on the CFQ "
6793 "I/O Scheduler and an example program."
6794 msgstr ""
6795
6796 #. type: SS
6797 #: build/C/man2/ioprio_set.2:280
6798 #, no-wrap
6799 msgid "Required permissions to set I/O priorities"
6800 msgstr ""
6801
6802 #. type: Plain text
6803 #: build/C/man2/ioprio_set.2:283
6804 msgid ""
6805 "Permission to change a process's priority is granted or denied based on two "
6806 "assertions:"
6807 msgstr ""
6808
6809 #. type: TP
6810 #: build/C/man2/ioprio_set.2:283
6811 #, no-wrap
6812 msgid "B<Process ownership>"
6813 msgstr ""
6814
6815 #. type: Plain text
6816 #: build/C/man2/ioprio_set.2:291
6817 msgid ""
6818 "An unprivileged process may only set the I/O priority of a process whose "
6819 "real UID matches the real or effective UID of the calling process.  A "
6820 "process which has the B<CAP_SYS_NICE> capability can change the priority of "
6821 "any process."
6822 msgstr ""
6823
6824 #. type: TP
6825 #: build/C/man2/ioprio_set.2:291
6826 #, no-wrap
6827 msgid "B<What is the desired priority>"
6828 msgstr ""
6829
6830 #. type: Plain text
6831 #: build/C/man2/ioprio_set.2:303
6832 msgid ""
6833 "Attempts to set very high priorities (B<IOPRIO_CLASS_RT>)  require the "
6834 "B<CAP_SYS_ADMIN> capability.  Kernel versions up to 2.6.24 also required "
6835 "B<CAP_SYS_ADMIN> to set a very low priority (B<IOPRIO_CLASS_IDLE>), but "
6836 "since Linux 2.6.25, this is no longer required."
6837 msgstr ""
6838
6839 #. type: Plain text
6840 #: build/C/man2/ioprio_set.2:308
6841 msgid ""
6842 "A call to B<ioprio_set>()  must follow both rules, or the call will fail "
6843 "with the error B<EPERM>."
6844 msgstr ""
6845
6846 #.  6 May 07: Bug report raised:
6847 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=4464
6848 #.  Ulrich Drepper replied that he wasn't going to add these
6849 #.  to glibc.
6850 #. type: Plain text
6851 #: build/C/man2/ioprio_set.2:317
6852 msgid ""
6853 "Glibc does not yet provide a suitable header file defining the function "
6854 "prototypes and macros described on this page.  Suitable definitions can be "
6855 "found in I<linux/ioprio.h>."
6856 msgstr ""
6857
6858 #. type: Plain text
6859 #: build/C/man2/ioprio_set.2:321
6860 msgid "B<getpriority>(2), B<open>(2), B<capabilities>(7)"
6861 msgstr ""
6862
6863 #. type: Plain text
6864 #: build/C/man2/ioprio_set.2:323
6865 msgid "Documentation/block/ioprio.txt in the kernel source tree."
6866 msgstr ""
6867
6868 #. type: TH
6869 #: build/C/man2/ipc.2:26
6870 #, no-wrap
6871 msgid "IPC"
6872 msgstr ""
6873
6874 #. type: TH
6875 #: build/C/man2/ipc.2:26
6876 #, no-wrap
6877 msgid "2007-06-28"
6878 msgstr ""
6879
6880 #. type: Plain text
6881 #: build/C/man2/ipc.2:29
6882 msgid "ipc - System V IPC system calls"
6883 msgstr ""
6884
6885 #. type: Plain text
6886 #: build/C/man2/ipc.2:34
6887 #, no-wrap
6888 msgid ""
6889 "B<int ipc(unsigned int >I<call>B<, int >I<first>B<, int >I<second>B<, int "
6890 ">I<third>B<,>\n"
6891 "B<        void *>I<ptr>B<, long >I<fifth>B<);>\n"
6892 msgstr ""
6893
6894 #. type: Plain text
6895 #: build/C/man2/ipc.2:42
6896 msgid ""
6897 "B<ipc>()  is a common kernel entry point for the System V IPC calls for "
6898 "messages, semaphores, and shared memory.  I<call> determines which IPC "
6899 "function to invoke; the other arguments are passed through to the "
6900 "appropriate call."
6901 msgstr ""
6902
6903 #. type: Plain text
6904 #: build/C/man2/ipc.2:46
6905 msgid ""
6906 "User programs should call the appropriate functions by their usual names.  "
6907 "Only standard library implementors and kernel hackers need to know about "
6908 "B<ipc>()."
6909 msgstr ""
6910
6911 #. type: Plain text
6912 #: build/C/man2/ipc.2:50
6913 msgid ""
6914 "B<ipc>()  is Linux-specific, and should not be used in programs intended to "
6915 "be portable."
6916 msgstr ""
6917
6918 #. type: Plain text
6919 #: build/C/man2/ipc.2:58
6920 msgid ""
6921 "On a few architectures, for example ia64, there is no B<ipc>()  system call; "
6922 "instead B<msgctl>(2), B<semctl>(2), B<shmctl>(2), and so on really are "
6923 "implemented as separate system calls."
6924 msgstr ""
6925
6926 #. type: Plain text
6927 #: build/C/man2/ipc.2:71
6928 msgid ""
6929 "B<msgctl>(2), B<msgget>(2), B<msgrcv>(2), B<msgsnd>(2), B<semctl>(2), "
6930 "B<semget>(2), B<semop>(2), B<semtimedop>(2), B<shmat>(2), B<shmctl>(2), "
6931 "B<shmdt>(2), B<shmget>(2)"
6932 msgstr ""
6933
6934 #. type: TH
6935 #: build/C/man2/seteuid.2:27
6936 #, no-wrap
6937 msgid "SETEUID"
6938 msgstr ""
6939
6940 #. type: TH
6941 #: build/C/man2/seteuid.2:27
6942 #, no-wrap
6943 msgid "2009-10-17"
6944 msgstr ""
6945
6946 #. type: Plain text
6947 #: build/C/man2/seteuid.2:30
6948 msgid "seteuid, setegid - set effective user or group ID"
6949 msgstr ""
6950
6951 #. type: Plain text
6952 #: build/C/man2/seteuid.2:36
6953 msgid "B<int seteuid(uid_t >I<euid>B<);>"
6954 msgstr ""
6955
6956 #. type: Plain text
6957 #: build/C/man2/seteuid.2:38
6958 msgid "B<int setegid(gid_t >I<egid>B<);>"
6959 msgstr ""
6960
6961 #. type: Plain text
6962 #: build/C/man2/seteuid.2:47
6963 msgid "B<seteuid>(), B<setegid>():"
6964 msgstr ""
6965
6966 #. type: Plain text
6967 #: build/C/man2/seteuid.2:49
6968 msgid ""
6969 "_BSD_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
6970 "E<gt>=\\ 600"
6971 msgstr ""
6972
6973 #. type: Plain text
6974 #: build/C/man2/seteuid.2:56
6975 msgid ""
6976 "B<seteuid>()  sets the effective user ID of the calling process.  "
6977 "Unprivileged user processes may only set the effective user ID to the real "
6978 "user ID, the effective user ID or the saved set-user-ID."
6979 msgstr ""
6980
6981 #.  When
6982 #.  .I euid
6983 #.  equals \-1, nothing is changed.
6984 #.  (This is an artifact of the implementation in glibc of seteuid()
6985 #.  using setresuid(2).)
6986 #. type: Plain text
6987 #: build/C/man2/seteuid.2:65
6988 msgid ""
6989 "Precisely the same holds for B<setegid>()  with \"group\" instead of "
6990 "\"user\"."
6991 msgstr ""
6992
6993 #. type: Plain text
6994 #: build/C/man2/seteuid.2:89
6995 msgid ""
6996 "The calling process is not privileged (Linux: does not have the "
6997 "B<CAP_SETUID> capability in the case of B<seteuid>(), or the B<CAP_SETGID> "
6998 "capability in the case of B<setegid>())  and I<euid> (respectively, I<egid>)  "
6999 "is not the real user (group) ID, the effective user (group) ID, or the saved "
7000 "set-user-ID (saved set-group-ID)."
7001 msgstr ""
7002
7003 #. type: Plain text
7004 #: build/C/man2/seteuid.2:91
7005 msgid "4.3BSD, POSIX.1-2001."
7006 msgstr ""
7007
7008 #. type: Plain text
7009 #: build/C/man2/seteuid.2:97
7010 msgid ""
7011 "Setting the effective user (group) ID to the saved set-user-ID (saved "
7012 "set-group-ID) is possible since Linux 1.1.37 (1.1.38).  On an arbitrary "
7013 "system one should check B<_POSIX_SAVED_IDS>."
7014 msgstr ""
7015
7016 #. type: Plain text
7017 #: build/C/man2/seteuid.2:108
7018 msgid ""
7019 "Under libc4, libc5 and glibc 2.0 B<seteuid(>I<euid>B<)> is equivalent to "
7020 "B<setreuid(-1,>I< euid>B<)> and hence may change the saved set-user-ID.  "
7021 "Under glibc 2.1 and later it is equivalent to B<setresuid(-1,>I< euid>B<, "
7022 "-1)> and hence does not change the saved set-user-ID.  Similar remarks hold "
7023 "for B<setegid>()."
7024 msgstr ""
7025
7026 #. type: Plain text
7027 #: build/C/man2/seteuid.2:117
7028 msgid ""
7029 "According to POSIX.1, B<seteuid>()  (B<setegid>())  need not permit I<euid> "
7030 "(I<egid>)  to be the same value as the current effective user (group) ID, "
7031 "and some implementations do not permit this."
7032 msgstr ""
7033
7034 #. type: Plain text
7035 #: build/C/man2/seteuid.2:124
7036 msgid ""
7037 "B<geteuid>(2), B<setresuid>(2), B<setreuid>(2), B<setuid>(2), "
7038 "B<capabilities>(7), B<credentials>(7)"
7039 msgstr ""
7040
7041 #. type: TH
7042 #: build/C/man2/setfsgid.2:29
7043 #, no-wrap
7044 msgid "SETFSGID"
7045 msgstr ""
7046
7047 #. type: Plain text
7048 #: build/C/man2/setfsgid.2:32
7049 msgid "setfsgid - set group identity used for file system checks"
7050 msgstr ""
7051
7052 #. type: Plain text
7053 #: build/C/man2/setfsgid.2:35 build/C/man2/setfsuid.2:35
7054 msgid "B<#include E<lt>unistd.hE<gt>> /* glibc uses E<lt>sys/fsuid.hE<gt> */"
7055 msgstr ""
7056
7057 #. type: Plain text
7058 #: build/C/man2/setfsgid.2:37
7059 msgid "B<int setfsgid(uid_t >I<fsgid>B<);>"
7060 msgstr ""
7061
7062 #. type: Plain text
7063 #: build/C/man2/setfsgid.2:49
7064 msgid ""
7065 "The system call B<setfsgid>()  sets the group ID that the Linux kernel uses "
7066 "to check for all accesses to the file system.  Normally, the value of "
7067 "I<fsgid> will shadow the value of the effective group ID.  In fact, whenever "
7068 "the effective group ID is changed, I<fsgid> will also be changed to the new "
7069 "value of the effective group ID."
7070 msgstr ""
7071
7072 #. type: Plain text
7073 #: build/C/man2/setfsgid.2:60
7074 msgid ""
7075 "Explicit calls to B<setfsuid>(2)  and B<setfsgid>()  are usually only used "
7076 "by programs such as the Linux NFS server that need to change what user and "
7077 "group ID is used for file access without a corresponding change in the real "
7078 "and effective user and group IDs.  A change in the normal user IDs for a "
7079 "program such as the NFS server is a security hole that can expose it to "
7080 "unwanted signals.  (But see below.)"
7081 msgstr ""
7082
7083 #. type: Plain text
7084 #: build/C/man2/setfsgid.2:67
7085 msgid ""
7086 "B<setfsgid>()  will only succeed if the caller is the superuser or if "
7087 "I<fsgid> matches either the real group ID, effective group ID, saved "
7088 "set-group-ID, or the current value of I<fsgid>."
7089 msgstr ""
7090
7091 #. type: Plain text
7092 #: build/C/man2/setfsgid.2:74
7093 msgid ""
7094 "On success, the previous value of I<fsgid> is returned.  On error, the "
7095 "current value of I<fsgid> is returned."
7096 msgstr ""
7097
7098 #.  This system call is present since Linux 1.1.44
7099 #.  and in libc since libc 4.7.6.
7100 #. type: Plain text
7101 #: build/C/man2/setfsgid.2:78 build/C/man2/setfsuid.2:78
7102 msgid "This system call is present in Linux since version 1.2."
7103 msgstr ""
7104
7105 #. type: Plain text
7106 #: build/C/man2/setfsgid.2:82
7107 msgid ""
7108 "B<setfsgid>()  is Linux-specific and should not be used in programs intended "
7109 "to be portable."
7110 msgstr ""
7111
7112 #. type: Plain text
7113 #: build/C/man2/setfsgid.2:88
7114 msgid ""
7115 "When glibc determines that the argument is not a valid group ID, it will "
7116 "return -1 and set I<errno> to B<EINVAL> without attempting the system call."
7117 msgstr ""
7118
7119 #. type: Plain text
7120 #: build/C/man2/setfsgid.2:92 build/C/man2/setfsuid.2:92
7121 msgid ""
7122 "Note that at the time this system call was introduced, a process could send "
7123 "a signal to a process with the same effective user ID.  Today signal "
7124 "permission handling is slightly different."
7125 msgstr ""
7126
7127 #. type: Plain text
7128 #: build/C/man2/setfsgid.2:102
7129 msgid ""
7130 "The original Linux B<setfsgid>()  system call supported only 16-bit group "
7131 "IDs.  Subsequently, Linux 2.4 added B<setfsgid32>()  supporting 32-bit IDs.  "
7132 "The glibc B<setfsgid>()  wrapper function transparently deals with the "
7133 "variation across kernel versions."
7134 msgstr ""
7135
7136 #. type: Plain text
7137 #: build/C/man2/setfsgid.2:110
7138 msgid ""
7139 "No error messages of any kind are returned to the caller.  At the very "
7140 "least, B<EPERM> should be returned when the call fails (because the caller "
7141 "lacks the B<CAP_SETGID> capability)."
7142 msgstr ""
7143
7144 #. type: Plain text
7145 #: build/C/man2/setfsgid.2:115
7146 msgid "B<kill>(2), B<setfsuid>(2), B<capabilities>(7), B<credentials>(7)"
7147 msgstr ""
7148
7149 #. type: TH
7150 #: build/C/man2/setfsuid.2:29
7151 #, no-wrap
7152 msgid "SETFSUID"
7153 msgstr ""
7154
7155 #. type: Plain text
7156 #: build/C/man2/setfsuid.2:32
7157 msgid "setfsuid - set user identity used for file system checks"
7158 msgstr ""
7159
7160 #. type: Plain text
7161 #: build/C/man2/setfsuid.2:37
7162 msgid "B<int setfsuid(uid_t >I<fsuid>B<);>"
7163 msgstr ""
7164
7165 #. type: Plain text
7166 #: build/C/man2/setfsuid.2:49
7167 msgid ""
7168 "The system call B<setfsuid>()  sets the user ID that the Linux kernel uses "
7169 "to check for all accesses to the file system.  Normally, the value of "
7170 "I<fsuid> will shadow the value of the effective user ID.  In fact, whenever "
7171 "the effective user ID is changed, I<fsuid> will also be changed to the new "
7172 "value of the effective user ID."
7173 msgstr ""
7174
7175 #. type: Plain text
7176 #: build/C/man2/setfsuid.2:60
7177 msgid ""
7178 "Explicit calls to B<setfsuid>()  and B<setfsgid>(2)  are usually only used "
7179 "by programs such as the Linux NFS server that need to change what user and "
7180 "group ID is used for file access without a corresponding change in the real "
7181 "and effective user and group IDs.  A change in the normal user IDs for a "
7182 "program such as the NFS server is a security hole that can expose it to "
7183 "unwanted signals.  (But see below.)"
7184 msgstr ""
7185
7186 #. type: Plain text
7187 #: build/C/man2/setfsuid.2:67
7188 msgid ""
7189 "B<setfsuid>()  will only succeed if the caller is the superuser or if "
7190 "I<fsuid> matches either the real user ID, effective user ID, saved "
7191 "set-user-ID, or the current value of I<fsuid>."
7192 msgstr ""
7193
7194 #. type: Plain text
7195 #: build/C/man2/setfsuid.2:74
7196 msgid ""
7197 "On success, the previous value of I<fsuid> is returned.  On error, the "
7198 "current value of I<fsuid> is returned."
7199 msgstr ""
7200
7201 #. type: Plain text
7202 #: build/C/man2/setfsuid.2:82
7203 msgid ""
7204 "B<setfsuid>()  is Linux-specific and should not be used in programs intended "
7205 "to be portable."
7206 msgstr ""
7207
7208 #. type: Plain text
7209 #: build/C/man2/setfsuid.2:88
7210 msgid ""
7211 "When glibc determines that the argument is not a valid user ID, it will "
7212 "return -1 and set I<errno> to B<EINVAL> without attempting the system call."
7213 msgstr ""
7214
7215 #. type: Plain text
7216 #: build/C/man2/setfsuid.2:102
7217 msgid ""
7218 "The original Linux B<setfsuid>()  system call supported only 16-bit user "
7219 "IDs.  Subsequently, Linux 2.4 added B<setfsuid32>()  supporting 32-bit IDs.  "
7220 "The glibc B<setfsuid>()  wrapper function transparently deals with the "
7221 "variation across kernel versions."
7222 msgstr ""
7223
7224 #. type: Plain text
7225 #: build/C/man2/setfsuid.2:110
7226 msgid ""
7227 "No error messages of any kind are returned to the caller.  At the very "
7228 "least, B<EPERM> should be returned when the call fails (because the caller "
7229 "lacks the B<CAP_SETUID> capability)."
7230 msgstr ""
7231
7232 #. type: Plain text
7233 #: build/C/man2/setfsuid.2:115
7234 msgid "B<kill>(2), B<setfsgid>(2), B<capabilities>(7), B<credentials>(7)"
7235 msgstr ""
7236
7237 #. type: TH
7238 #: build/C/man2/setgid.2:27
7239 #, no-wrap
7240 msgid "SETGID"
7241 msgstr ""
7242
7243 #. type: Plain text
7244 #: build/C/man2/setgid.2:30
7245 msgid "setgid - set group identity"
7246 msgstr ""
7247
7248 #. type: Plain text
7249 #: build/C/man2/setgid.2:36
7250 msgid "B<int setgid(gid_t >I<gid>B<);>"
7251 msgstr ""
7252
7253 #. type: Plain text
7254 #: build/C/man2/setgid.2:41
7255 msgid ""
7256 "B<setgid>()  sets the effective group ID of the calling process.  If the "
7257 "caller is the superuser, the real GID and saved set-group-ID are also set."
7258 msgstr ""
7259
7260 #. type: Plain text
7261 #: build/C/man2/setgid.2:51
7262 msgid ""
7263 "Under Linux, B<setgid>()  is implemented like the POSIX version with the "
7264 "B<_POSIX_SAVED_IDS> feature.  This allows a set-group-ID program that is not "
7265 "set-user-ID-root to drop all of its group privileges, do some un-privileged "
7266 "work, and then reengage the original effective group ID in a secure manner."
7267 msgstr ""
7268
7269 #. type: Plain text
7270 #: build/C/man2/setgid.2:64
7271 msgid ""
7272 "The calling process is not privileged (does not have the B<CAP_SETGID> "
7273 "capability), and I<gid> does not match the real group ID or saved "
7274 "set-group-ID of the calling process."
7275 msgstr ""
7276
7277 #. type: Plain text
7278 #: build/C/man2/setgid.2:74
7279 msgid ""
7280 "The original Linux B<setgid>()  system call supported only 16-bit group "
7281 "IDs.  Subsequently, Linux 2.4 added B<setgid32>()  supporting 32-bit IDs.  "
7282 "The glibc B<setgid>()  wrapper function transparently deals with the "
7283 "variation across kernel versions."
7284 msgstr ""
7285
7286 #. type: Plain text
7287 #: build/C/man2/setgid.2:82
7288 msgid ""
7289 "B<getgid>(2), B<setegid>(2), B<setregid>(2), B<capabilities>(7), "
7290 "B<credentials>(7)"
7291 msgstr ""
7292
7293 #. type: TH
7294 #: build/C/man2/setpgid.2:46
7295 #, no-wrap
7296 msgid "SETPGID"
7297 msgstr ""
7298
7299 #. type: Plain text
7300 #: build/C/man2/setpgid.2:49
7301 msgid "setpgid, getpgid, setpgrp, getpgrp - set/get process group"
7302 msgstr ""
7303
7304 #. type: Plain text
7305 #: build/C/man2/setpgid.2:53
7306 msgid "B<int setpgid(pid_t >I<pid>B<, pid_t >I<pgid>B<);>"
7307 msgstr ""
7308
7309 #. type: Plain text
7310 #: build/C/man2/setpgid.2:55
7311 msgid "B<pid_t getpgid(pid_t >I<pid>B<);>"
7312 msgstr ""
7313
7314 #. type: Plain text
7315 #: build/C/man2/setpgid.2:57
7316 msgid "B<pid_t getpgrp(void);> /* POSIX.1 version */"
7317 msgstr ""
7318
7319 #. type: Plain text
7320 #: build/C/man2/setpgid.2:60
7321 msgid ""
7322 "B<pid_t getpgrp(pid_t >I<pid>B<);\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ > /* BSD "
7323 "version */"
7324 msgstr ""
7325
7326 #. type: Plain text
7327 #: build/C/man2/setpgid.2:62
7328 msgid "B<int setpgrp(void);> /* System V version */"
7329 msgstr ""
7330
7331 #. type: Plain text
7332 #: build/C/man2/setpgid.2:65
7333 msgid "B<int setpgrp(pid_t >I<pid>B<, pid_t >I<pgid>B<);\\ > /* BSD version */"
7334 msgstr ""
7335
7336 #. type: Plain text
7337 #: build/C/man2/setpgid.2:74
7338 msgid "B<getpgid>():"
7339 msgstr ""
7340
7341 #. type: Plain text
7342 #: build/C/man2/setpgid.2:82
7343 msgid "B<setpgrp>() (POSIX.1):"
7344 msgstr ""
7345
7346 #. type: Plain text
7347 #: build/C/man2/setpgid.2:85
7348 #, no-wrap
7349 msgid ""
7350 "    _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7351 "    _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED\n"
7352 msgstr ""
7353
7354 #. type: Plain text
7355 #: build/C/man2/setpgid.2:89
7356 msgid "B<setpgrp>()\\ (BSD), B<getpgrp>()\\ (BSD):"
7357 msgstr ""
7358
7359 #. type: Plain text
7360 #: build/C/man2/setpgid.2:93
7361 #, no-wrap
7362 msgid ""
7363 "    _BSD_SOURCE &&\n"
7364 "        !\\ (_POSIX_SOURCE || _POSIX_C_SOURCE || _XOPEN_SOURCE ||\n"
7365 "           _XOPEN_SOURCE_EXTENDED || _GNU_SOURCE || _SVID_SOURCE)\n"
7366 msgstr ""
7367
7368 #. type: Plain text
7369 #: build/C/man2/setpgid.2:105
7370 msgid ""
7371 "All of these interfaces are available on Linux, and are used for getting and "
7372 "setting the process group ID (PGID) of a process.  The preferred, "
7373 "POSIX.1-specified ways of doing this are: B<getpgrp>(void), for retrieving "
7374 "the calling process's PGID; and B<setpgid>(), for setting a process's PGID."
7375 msgstr ""
7376
7377 #. type: Plain text
7378 #: build/C/man2/setpgid.2:130
7379 msgid ""
7380 "B<setpgid>()  sets the PGID of the process specified by I<pid> to I<pgid>.  "
7381 "If I<pid> is zero, then the process ID of the calling process is used.  If "
7382 "I<pgid> is zero, then the PGID of the process specified by I<pid> is made "
7383 "the same as its process ID.  If B<setpgid>()  is used to move a process from "
7384 "one process group to another (as is done by some shells when creating "
7385 "pipelines), both process groups must be part of the same session (see "
7386 "B<setsid>(2)  and B<credentials>(7)).  In this case, the I<pgid> specifies "
7387 "an existing process group to be joined and the session ID of that group must "
7388 "match the session ID of the joining process."
7389 msgstr ""
7390
7391 #. type: Plain text
7392 #: build/C/man2/setpgid.2:135
7393 msgid ""
7394 "The POSIX.1 version of B<getpgrp>(), which takes no arguments, returns the "
7395 "PGID of the calling process."
7396 msgstr ""
7397
7398 #. type: Plain text
7399 #: build/C/man2/setpgid.2:146
7400 msgid ""
7401 "B<getpgid>()  returns the PGID of the process specified by I<pid>.  If "
7402 "I<pid> is zero, the process ID of the calling process is used.  (Retrieving "
7403 "the PGID of a process other than the caller is rarely necessary, and the "
7404 "POSIX.1 B<getpgrp>()  is preferred for that task.)"
7405 msgstr ""
7406
7407 #. type: Plain text
7408 #: build/C/man2/setpgid.2:151
7409 msgid ""
7410 "The System V-style B<setpgrp>(), which takes no arguments, is equivalent to "
7411 "I<setpgid(0,\\ 0)>."
7412 msgstr ""
7413
7414 #.  The true BSD setpgrp() system call differs in allowing the PGID
7415 #.  to be set to arbitrary values, rather than being restricted to
7416 #.  PGIDs in the same session.
7417 #. type: Plain text
7418 #: build/C/man2/setpgid.2:163
7419 msgid ""
7420 "The BSD-specific B<setpgrp>()  call, which takes arguments I<pid> and "
7421 "I<pgid>, is equivalent to I<setpgid(pid, pgid)>."
7422 msgstr ""
7423
7424 #. type: Plain text
7425 #: build/C/man2/setpgid.2:170
7426 msgid ""
7427 "The BSD-specific B<getpgrp>()  call, which takes a single I<pid> argument, "
7428 "is equivalent to I<getpgid(pid)>."
7429 msgstr ""
7430
7431 #. type: Plain text
7432 #: build/C/man2/setpgid.2:179
7433 msgid ""
7434 "On success, B<setpgid>()  and B<setpgrp>()  return zero.  On error, -1 is "
7435 "returned, and I<errno> is set appropriately."
7436 msgstr ""
7437
7438 #. type: Plain text
7439 #: build/C/man2/setpgid.2:183
7440 msgid "The POSIX.1 B<getpgrp>()  always returns the PGID of the caller."
7441 msgstr ""
7442
7443 #. type: Plain text
7444 #: build/C/man2/setpgid.2:191
7445 msgid ""
7446 "B<getpgid>(), and the BSD-specific B<getpgrp>()  return a process group on "
7447 "success.  On error, -1 is returned, and I<errno> is set appropriately."
7448 msgstr ""
7449
7450 #. type: Plain text
7451 #: build/C/man2/setpgid.2:200
7452 msgid ""
7453 "An attempt was made to change the process group ID of one of the children of "
7454 "the calling process and the child had already performed an B<execve>(2)  "
7455 "(B<setpgid>(), B<setpgrp>())."
7456 msgstr ""
7457
7458 #. type: Plain text
7459 #: build/C/man2/setpgid.2:206
7460 msgid "I<pgid> is less than 0 (B<setpgid>(), B<setpgrp>())."
7461 msgstr ""
7462
7463 #. type: Plain text
7464 #: build/C/man2/setpgid.2:215
7465 msgid ""
7466 "An attempt was made to move a process into a process group in a different "
7467 "session, or to change the process group ID of one of the children of the "
7468 "calling process and the child was in a different session, or to change the "
7469 "process group ID of a session leader (B<setpgid>(), B<setpgrp>())."
7470 msgstr ""
7471
7472 #. type: Plain text
7473 #: build/C/man2/setpgid.2:225
7474 msgid ""
7475 "For B<getpgid>(): I<pid> does not match any process.  For B<setpgid>(): "
7476 "I<pid> is not the calling process and not a child of the calling process."
7477 msgstr ""
7478
7479 #. type: Plain text
7480 #: build/C/man2/setpgid.2:231
7481 msgid ""
7482 "B<setpgid>()  and the version of B<getpgrp>()  with no arguments conform to "
7483 "POSIX.1-2001."
7484 msgstr ""
7485
7486 #. type: Plain text
7487 #: build/C/man2/setpgid.2:240
7488 msgid ""
7489 "POSIX.1-2001 also specifies B<getpgid>()  and the version of B<setpgrp>()  "
7490 "that takes no arguments.  (POSIX.1-2008 marks this B<setpgrp>()  "
7491 "specification as obsolete.)"
7492 msgstr ""
7493
7494 #. type: Plain text
7495 #: build/C/man2/setpgid.2:247
7496 msgid ""
7497 "The version of B<getpgrp>()  with one argument and the version of "
7498 "B<setpgrp>()  that takes two arguments derive from 4.2BSD, and are not "
7499 "specified by POSIX.1."
7500 msgstr ""
7501
7502 #. type: Plain text
7503 #: build/C/man2/setpgid.2:253
7504 msgid ""
7505 "A child created via B<fork>(2)  inherits its parent's process group ID.  The "
7506 "PGID is preserved across an B<execve>(2)."
7507 msgstr ""
7508
7509 #. type: Plain text
7510 #: build/C/man2/setpgid.2:256
7511 msgid ""
7512 "Each process group is a member of a session and each process is a member of "
7513 "the session of which its process group is a member."
7514 msgstr ""
7515
7516 #. type: Plain text
7517 #: build/C/man2/setpgid.2:283
7518 msgid ""
7519 "A session can have a controlling terminal.  At any time, one (and only one) "
7520 "of the process groups in the session can be the foreground process group for "
7521 "the terminal; the remaining process groups are in the background.  If a "
7522 "signal is generated from the terminal (e.g., typing the interrupt key to "
7523 "generate B<SIGINT>), that signal is sent to the foreground process group.  "
7524 "(See B<termios>(3)  for a description of the characters that generate "
7525 "signals.)  Only the foreground process group may B<read>(2)  from the "
7526 "terminal; if a background process group tries to B<read>(2)  from the "
7527 "terminal, then the group is sent a B<SIGTSTP> signal, which suspends it.  "
7528 "The B<tcgetpgrp>(3)  and B<tcsetpgrp>(3)  functions are used to get/set the "
7529 "foreground process group of the controlling terminal."
7530 msgstr ""
7531
7532 #. type: Plain text
7533 #: build/C/man2/setpgid.2:291
7534 msgid ""
7535 "The B<setpgid>()  and B<getpgrp>()  calls are used by programs such as "
7536 "B<bash>(1)  to create process groups in order to implement shell job "
7537 "control."
7538 msgstr ""
7539
7540 #. type: Plain text
7541 #: build/C/man2/setpgid.2:301
7542 msgid ""
7543 "If a session has a controlling terminal, and the B<CLOCAL> flag for that "
7544 "terminal is not set, and a terminal hangup occurs, then the session leader "
7545 "is sent a B<SIGHUP>.  If the session leader exits, then a B<SIGHUP> signal "
7546 "will also be sent to each process in the foreground process group of the "
7547 "controlling terminal."
7548 msgstr ""
7549
7550 #.  exit.3 refers to the following text:
7551 #. type: Plain text
7552 #: build/C/man2/setpgid.2:315
7553 msgid ""
7554 "If the exit of the process causes a process group to become orphaned, and if "
7555 "any member of the newly orphaned process group is stopped, then a B<SIGHUP> "
7556 "signal followed by a B<SIGCONT> signal will be sent to each process in the "
7557 "newly orphaned process group.  An orphaned process group is one in which the "
7558 "parent of every member of process group is either itself also a member of "
7559 "the process group or is a member of a process group in a different session "
7560 "(see also B<credentials>(7))."
7561 msgstr ""
7562
7563 #. type: Plain text
7564 #: build/C/man2/setpgid.2:322
7565 msgid ""
7566 "B<getuid>(2), B<setsid>(2), B<tcgetpgrp>(3), B<tcsetpgrp>(3), B<termios>(3), "
7567 "B<credentials>(7)"
7568 msgstr ""
7569
7570 #. type: TH
7571 #: build/C/man2/setresuid.2:26
7572 #, no-wrap
7573 msgid "SETRESUID"
7574 msgstr ""
7575
7576 #. type: Plain text
7577 #: build/C/man2/setresuid.2:29
7578 msgid "setresuid, setresgid - set real, effective and saved user or group ID"
7579 msgstr ""
7580
7581 #. type: Plain text
7582 #: build/C/man2/setresuid.2:35
7583 msgid "B<int setresuid(uid_t >I<ruid>B<, uid_t >I<euid>B<, uid_t >I<suid>B<);>"
7584 msgstr ""
7585
7586 #. type: Plain text
7587 #: build/C/man2/setresuid.2:37
7588 msgid "B<int setresgid(gid_t >I<rgid>B<, gid_t >I<egid>B<, gid_t >I<sgid>B<);>"
7589 msgstr ""
7590
7591 #. type: Plain text
7592 #: build/C/man2/setresuid.2:41
7593 msgid ""
7594 "B<setresuid>()  sets the real user ID, the effective user ID, and the saved "
7595 "set-user-ID of the calling process."
7596 msgstr ""
7597
7598 #. type: Plain text
7599 #: build/C/man2/setresuid.2:47
7600 msgid ""
7601 "Unprivileged user processes may change the real UID, effective UID, and "
7602 "saved set-user-ID, each to one of: the current real UID, the current "
7603 "effective UID or the current saved set-user-ID."
7604 msgstr ""
7605
7606 #. type: Plain text
7607 #: build/C/man2/setresuid.2:51
7608 msgid ""
7609 "Privileged processes (on Linux, those having the B<CAP_SETUID> capability)  "
7610 "may set the real UID, effective UID, and saved set-user-ID to arbitrary "
7611 "values."
7612 msgstr ""
7613
7614 #. type: Plain text
7615 #: build/C/man2/setresuid.2:53
7616 msgid "If one of the arguments equals -1, the corresponding value is not changed."
7617 msgstr ""
7618
7619 #. type: Plain text
7620 #: build/C/man2/setresuid.2:57
7621 msgid ""
7622 "Regardless of what changes are made to the real UID, effective UID, and "
7623 "saved set-user-ID, the file system UID is always set to the same value as "
7624 "the (possibly new) effective UID."
7625 msgstr ""
7626
7627 #. type: Plain text
7628 #: build/C/man2/setresuid.2:64
7629 msgid ""
7630 "Completely analogously, B<setresgid>()  sets the real GID, effective GID, "
7631 "and saved set-group-ID of the calling process (and always modifies the file "
7632 "system GID to be the same as the effective GID), with the same restrictions "
7633 "for unprivileged processes."
7634 msgstr ""
7635
7636 #. type: TP
7637 #: build/C/man2/setresuid.2:70 build/C/man2/setuid.2:74
7638 #, no-wrap
7639 msgid "B<EAGAIN>"
7640 msgstr ""
7641
7642 #. type: Plain text
7643 #: build/C/man2/setresuid.2:77
7644 msgid ""
7645 "I<uid> does not match the current UID and this call would bring that user ID "
7646 "over its B<RLIMIT_NPROC> resource limit."
7647 msgstr ""
7648
7649 #. type: Plain text
7650 #: build/C/man2/setresuid.2:81
7651 msgid ""
7652 "The calling process is not privileged (did not have the B<CAP_SETUID> "
7653 "capability) and tried to change the IDs to values that are not permitted."
7654 msgstr ""
7655
7656 #. type: Plain text
7657 #: build/C/man2/setresuid.2:83
7658 msgid "These calls are available under Linux since Linux 2.1.44."
7659 msgstr ""
7660
7661 #. type: Plain text
7662 #: build/C/man2/setresuid.2:90
7663 msgid ""
7664 "Under HP-UX and FreeBSD, the prototype is found in I<E<lt>unistd.hE<gt>>.  "
7665 "Under Linux the prototype is provided by glibc since version 2.3.2."
7666 msgstr ""
7667
7668 #. type: Plain text
7669 #: build/C/man2/setresuid.2:106
7670 msgid ""
7671 "The original Linux B<setresuid>()  and B<setresgid>()  system calls "
7672 "supported only 16-bit user and group IDs.  Subsequently, Linux 2.4 added "
7673 "B<setresuid32>()  and B<setresgid32>(), supporting 32-bit IDs.  The glibc "
7674 "B<setresuid>()  and B<setresgid>()  wrapper functions transparently deal "
7675 "with the variations across kernel versions."
7676 msgstr ""
7677
7678 #. type: Plain text
7679 #: build/C/man2/setresuid.2:115
7680 msgid ""
7681 "B<getresuid>(2), B<getuid>(2), B<setfsgid>(2), B<setfsuid>(2), "
7682 "B<setreuid>(2), B<setuid>(2), B<capabilities>(7), B<credentials>(7)"
7683 msgstr ""
7684
7685 #. type: TH
7686 #: build/C/man2/setreuid.2:43
7687 #, no-wrap
7688 msgid "SETREUID"
7689 msgstr ""
7690
7691 #. type: Plain text
7692 #: build/C/man2/setreuid.2:46
7693 msgid "setreuid, setregid - set real and/or effective user or group ID"
7694 msgstr ""
7695
7696 #. type: Plain text
7697 #: build/C/man2/setreuid.2:52
7698 msgid "B<int setreuid(uid_t >I<ruid>B<, uid_t >I<euid>B<);>"
7699 msgstr ""
7700
7701 #. type: Plain text
7702 #: build/C/man2/setreuid.2:54
7703 msgid "B<int setregid(gid_t >I<rgid>B<, gid_t >I<egid>B<);>"
7704 msgstr ""
7705
7706 #. type: Plain text
7707 #: build/C/man2/setreuid.2:62
7708 msgid "B<setreuid>(), B<setregid>():"
7709 msgstr ""
7710
7711 #. type: Plain text
7712 #: build/C/man2/setreuid.2:66
7713 msgid ""
7714 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
7715 "_XOPEN_SOURCE_EXTENDED"
7716 msgstr ""
7717
7718 #. type: Plain text
7719 #: build/C/man2/setreuid.2:71
7720 msgid "B<setreuid>()  sets real and effective user IDs of the calling process."
7721 msgstr ""
7722
7723 #. type: Plain text
7724 #: build/C/man2/setreuid.2:74
7725 msgid ""
7726 "Supplying a value of -1 for either the real or effective user ID forces the "
7727 "system to leave that ID unchanged."
7728 msgstr ""
7729
7730 #. type: Plain text
7731 #: build/C/man2/setreuid.2:77
7732 msgid ""
7733 "Unprivileged processes may only set the effective user ID to the real user "
7734 "ID, the effective user ID, or the saved set-user-ID."
7735 msgstr ""
7736
7737 #. type: Plain text
7738 #: build/C/man2/setreuid.2:80
7739 msgid ""
7740 "Unprivileged users may only set the real user ID to the real user ID or the "
7741 "effective user ID."
7742 msgstr ""
7743
7744 #. type: Plain text
7745 #: build/C/man2/setreuid.2:84
7746 msgid ""
7747 "If the real user ID is set or the effective user ID is set to a value not "
7748 "equal to the previous real user ID, the saved set-user-ID will be set to the "
7749 "new effective user ID."
7750 msgstr ""
7751
7752 #. type: Plain text
7753 #: build/C/man2/setreuid.2:89
7754 msgid ""
7755 "Completely analogously, B<setregid>()  sets real and effective group ID's of "
7756 "the calling process, and all of the above holds with \"group\" instead of "
7757 "\"user\"."
7758 msgstr ""
7759
7760 #. type: Plain text
7761 #: build/C/man2/setreuid.2:111
7762 msgid ""
7763 "The calling process is not privileged (Linux: does not have the "
7764 "B<CAP_SETUID> capability in the case of B<setreuid>(), or the B<CAP_SETGID> "
7765 "capability in the case of B<setregid>())  and a change other than (i)  "
7766 "swapping the effective user (group) ID with the real user (group) ID, or "
7767 "(ii) setting one to the value of the other or (iii) setting the effective "
7768 "user (group) ID to the value of the saved set-user-ID (saved set-group-ID) "
7769 "was specified."
7770 msgstr ""
7771
7772 #. type: Plain text
7773 #: build/C/man2/setreuid.2:117
7774 msgid ""
7775 "POSIX.1-2001, 4.3BSD (the B<setreuid>()  and B<setregid>()  function calls "
7776 "first appeared in 4.2BSD)."
7777 msgstr ""
7778
7779 #. type: Plain text
7780 #: build/C/man2/setreuid.2:121
7781 msgid ""
7782 "Setting the effective user (group) ID to the saved set-user-ID (saved "
7783 "set-group-ID) is possible since Linux 1.1.37 (1.1.38)."
7784 msgstr ""
7785
7786 #. type: Plain text
7787 #: build/C/man2/setreuid.2:138
7788 msgid ""
7789 "POSIX.1 does not specify all of possible ID changes that are permitted on "
7790 "Linux for an unprivileged process.  For B<setreuid>(), the effective user ID "
7791 "can be made the same as the real user ID or the save set-user-ID, and it is "
7792 "unspecified whether unprivileged processes may set the real user ID to the "
7793 "real user ID, the effective user ID, or the saved set-user-ID.  For "
7794 "B<setregid>(), the real group ID can be changed to the value of the saved "
7795 "set-group-ID, and the effective group ID can be changed to the value of the "
7796 "real group ID or the saved set-group-ID.  The precise details of what ID "
7797 "changes are permitted vary across implementations."
7798 msgstr ""
7799
7800 #. type: Plain text
7801 #: build/C/man2/setreuid.2:141
7802 msgid ""
7803 "POSIX.1 makes no specification about the effect of these calls on the saved "
7804 "set-user-ID and saved set-group-ID."
7805 msgstr ""
7806
7807 #. type: Plain text
7808 #: build/C/man2/setreuid.2:157
7809 msgid ""
7810 "The original Linux B<setreuid>()  and B<setregid>()  system calls supported "
7811 "only 16-bit user and group IDs.  Subsequently, Linux 2.4 added "
7812 "B<setreuid32>()  and B<setregid32>(), supporting 32-bit IDs.  The glibc "
7813 "B<setreuid>()  and B<setregid>()  wrapper functions transparently deal with "
7814 "the variations across kernel versions."
7815 msgstr ""
7816
7817 #. type: Plain text
7818 #: build/C/man2/setreuid.2:165
7819 msgid ""
7820 "B<getgid>(2), B<getuid>(2), B<seteuid>(2), B<setgid>(2), B<setresuid>(2), "
7821 "B<setuid>(2), B<capabilities>(7)"
7822 msgstr ""
7823
7824 #. type: TH
7825 #: build/C/man2/setsid.2:29
7826 #, no-wrap
7827 msgid "SETSID"
7828 msgstr ""
7829
7830 #. type: TH
7831 #: build/C/man2/setsid.2:29
7832 #, no-wrap
7833 msgid "2008-12-03"
7834 msgstr ""
7835
7836 #. type: Plain text
7837 #: build/C/man2/setsid.2:32
7838 msgid "setsid - creates a session and sets the process group ID"
7839 msgstr ""
7840
7841 #. type: Plain text
7842 #: build/C/man2/setsid.2:37
7843 msgid "B<pid_t setsid(void);>"
7844 msgstr ""
7845
7846 #. type: Plain text
7847 #: build/C/man2/setsid.2:50
7848 msgid ""
7849 "B<setsid>()  creates a new session if the calling process is not a process "
7850 "group leader.  The calling process is the leader of the new session, the "
7851 "process group leader of the new process group, and has no controlling tty.  "
7852 "The process group ID and session ID of the calling process are set to the "
7853 "PID of the calling process.  The calling process will be the only process in "
7854 "this new process group and in this new session."
7855 msgstr ""
7856
7857 #. type: Plain text
7858 #: build/C/man2/setsid.2:57
7859 msgid ""
7860 "On success, the (new) session ID of the calling process is returned.  On "
7861 "error, I<(pid_t)\\ -1> is returned, and I<errno> is set to indicate the "
7862 "error."
7863 msgstr ""
7864
7865 #. type: Plain text
7866 #: build/C/man2/setsid.2:64
7867 msgid ""
7868 "The process group ID of any process equals the PID of the calling process.  "
7869 "Thus, in particular, B<setsid>()  fails if the calling process is already a "
7870 "process group leader."
7871 msgstr ""
7872
7873 #. type: Plain text
7874 #: build/C/man2/setsid.2:72
7875 msgid ""
7876 "A child created via B<fork>(2)  inherits its parent's session ID.  The "
7877 "session ID is preserved across an B<execve>(2)."
7878 msgstr ""
7879
7880 #. type: Plain text
7881 #: build/C/man2/setsid.2:83
7882 msgid ""
7883 "A process group leader is a process with process group ID equal to its PID.  "
7884 "In order to be sure that B<setsid>()  will succeed, B<fork>(2)  and "
7885 "B<_exit>(2), and have the child do B<setsid>()."
7886 msgstr ""
7887
7888 #. type: Plain text
7889 #: build/C/man2/setsid.2:89
7890 msgid ""
7891 "B<getsid>(2), B<setpgid>(2), B<setpgrp>(2), B<tcgetsid>(3), "
7892 "B<credentials>(7)"
7893 msgstr ""
7894
7895 #. type: TH
7896 #: build/C/man2/setuid.2:28
7897 #, no-wrap
7898 msgid "SETUID"
7899 msgstr ""
7900
7901 #. type: Plain text
7902 #: build/C/man2/setuid.2:31
7903 msgid "setuid - set user identity"
7904 msgstr ""
7905
7906 #. type: Plain text
7907 #: build/C/man2/setuid.2:37
7908 msgid "B<int setuid(uid_t >I<uid>B<);>"
7909 msgstr ""
7910
7911 #. type: Plain text
7912 #: build/C/man2/setuid.2:42
7913 msgid ""
7914 "B<setuid>()  sets the effective user ID of the calling process.  If the "
7915 "effective UID of the caller is root, the real UID and saved set-user-ID are "
7916 "also set."
7917 msgstr ""
7918
7919 #. type: Plain text
7920 #: build/C/man2/setuid.2:51
7921 msgid ""
7922 "Under Linux, B<setuid>()  is implemented like the POSIX version with the "
7923 "B<_POSIX_SAVED_IDS> feature.  This allows a set-user-ID (other than root) "
7924 "program to drop all of its user privileges, do some un-privileged work, and "
7925 "then reengage the original effective user ID in a secure manner."
7926 msgstr ""
7927
7928 #. type: Plain text
7929 #: build/C/man2/setuid.2:61
7930 msgid ""
7931 "If the user is root or the program is set-user-ID-root, special care must be "
7932 "taken.  The B<setuid>()  function checks the effective user ID of the caller "
7933 "and if it is the superuser, all process-related user ID's are set to "
7934 "I<uid>.  After this has occurred, it is impossible for the program to regain "
7935 "root privileges."
7936 msgstr ""
7937
7938 #. type: Plain text
7939 #: build/C/man2/setuid.2:68
7940 msgid ""
7941 "Thus, a set-user-ID-root program wishing to temporarily drop root "
7942 "privileges, assume the identity of an unprivileged user, and then regain "
7943 "root privileges afterward cannot use B<setuid>().  You can accomplish this "
7944 "with B<seteuid>(2)."
7945 msgstr ""
7946
7947 #. type: Plain text
7948 #: build/C/man2/setuid.2:83
7949 msgid ""
7950 "The I<uid> does not match the current uid and I<uid> brings process over its "
7951 "B<RLIMIT_NPROC> resource limit."
7952 msgstr ""
7953
7954 #. type: Plain text
7955 #: build/C/man2/setuid.2:90
7956 msgid ""
7957 "The user is not privileged (Linux: does not have the B<CAP_SETUID> "
7958 "capability) and I<uid> does not match the real UID or saved set-user-ID of "
7959 "the calling process."
7960 msgstr ""
7961
7962 #.  SVr4 documents an additional EINVAL error condition.
7963 #. type: Plain text
7964 #: build/C/man2/setuid.2:95
7965 msgid ""
7966 "SVr4, POSIX.1-2001.  Not quite compatible with the 4.4BSD call, which sets "
7967 "all of the real, saved, and effective user IDs."
7968 msgstr ""
7969
7970 #. type: Plain text
7971 #: build/C/man2/setuid.2:103
7972 msgid ""
7973 "Linux has the concept of the file system user ID, normally equal to the "
7974 "effective user ID.  The B<setuid>()  call also sets the file system user ID "
7975 "of the calling process.  See B<setfsuid>(2)."
7976 msgstr ""
7977
7978 #. type: Plain text
7979 #: build/C/man2/setuid.2:108
7980 msgid ""
7981 "If I<uid> is different from the old effective UID, the process will be "
7982 "forbidden from leaving core dumps."
7983 msgstr ""
7984
7985 #. type: Plain text
7986 #: build/C/man2/setuid.2:118
7987 msgid ""
7988 "The original Linux B<setuid>()  system call supported only 16-bit user IDs.  "
7989 "Subsequently, Linux 2.4 added B<setuid32>()  supporting 32-bit IDs.  The "
7990 "glibc B<setuid>()  wrapper function transparently deals with the variation "
7991 "across kernel versions."
7992 msgstr ""
7993
7994 #. type: Plain text
7995 #: build/C/man2/setuid.2:125
7996 msgid ""
7997 "B<getuid>(2), B<seteuid>(2), B<setfsuid>(2), B<setreuid>(2), "
7998 "B<capabilities>(7), B<credentials>(7)"
7999 msgstr ""
8000
8001 #. type: TH
8002 #: build/C/man7/svipc.7:25
8003 #, no-wrap
8004 msgid "SVIPC"
8005 msgstr ""
8006
8007 #. type: TH
8008 #: build/C/man7/svipc.7:25
8009 #, no-wrap
8010 msgid "2009-01-26"
8011 msgstr ""
8012
8013 #. type: Plain text
8014 #: build/C/man7/svipc.7:28
8015 msgid "svipc - System V interprocess communication mechanisms"
8016 msgstr ""
8017
8018 #. type: Plain text
8019 #: build/C/man7/svipc.7:35
8020 #, no-wrap
8021 msgid ""
8022 "B<#include E<lt>sys/types.hE<gt>>\n"
8023 "B<#include E<lt>sys/ipc.hE<gt>>\n"
8024 "B<#include E<lt>sys/msg.hE<gt>>\n"
8025 "B<#include E<lt>sys/sem.hE<gt>>\n"
8026 "B<#include E<lt>sys/shm.hE<gt>>\n"
8027 msgstr ""
8028
8029 #. type: Plain text
8030 #: build/C/man7/svipc.7:43
8031 msgid ""
8032 "This manual page refers to the Linux implementation of the System V "
8033 "interprocess communication (IPC) mechanisms: message queues, semaphore sets, "
8034 "and shared memory segments.  In the following, the word I<resource> means an "
8035 "instantiation of one among such mechanisms."
8036 msgstr ""
8037
8038 #. type: SS
8039 #: build/C/man7/svipc.7:43
8040 #, no-wrap
8041 msgid "Resource Access Permissions"
8042 msgstr ""
8043
8044 #. type: Plain text
8045 #: build/C/man7/svipc.7:53
8046 msgid ""
8047 "For each resource, the system uses a common structure of type I<struct "
8048 "ipc_perm> to store information needed in determining permissions to perform "
8049 "an IPC operation.  The I<ipc_perm> structure, defined by the "
8050 "I<E<lt>sys/ipc.hE<gt>> system header file, includes the following members:"
8051 msgstr ""
8052
8053 #. type: Plain text
8054 #: build/C/man7/svipc.7:63
8055 #, no-wrap
8056 msgid ""
8057 "struct ipc_perm {\n"
8058 "    uid_t          cuid;   /* creator user ID */\n"
8059 "    gid_t          cgid;   /* creator group ID */\n"
8060 "    uid_t          uid;    /* owner user ID */\n"
8061 "    gid_t          gid;    /* owner group ID */\n"
8062 "    unsigned short mode;   /* r/w permissions */\n"
8063 "};\n"
8064 msgstr ""
8065
8066 #. type: Plain text
8067 #: build/C/man7/svipc.7:73
8068 msgid ""
8069 "The I<mode> member of the I<ipc_perm> structure defines, with its lower 9 "
8070 "bits, the access permissions to the resource for a process executing an IPC "
8071 "system call.  The permissions are interpreted as follows:"
8072 msgstr ""
8073
8074 #. type: Plain text
8075 #: build/C/man7/svipc.7:77
8076 #, no-wrap
8077 msgid ""
8078 "    0400    Read by user.\n"
8079 "    0200    Write by user.\n"
8080 msgstr ""
8081
8082 #. type: Plain text
8083 #: build/C/man7/svipc.7:80
8084 #, no-wrap
8085 msgid ""
8086 "    0040    Read by group.\n"
8087 "    0020    Write by group.\n"
8088 msgstr ""
8089
8090 #. type: Plain text
8091 #: build/C/man7/svipc.7:83
8092 #, no-wrap
8093 msgid ""
8094 "    0004    Read by others.\n"
8095 "    0002    Write by others.\n"
8096 msgstr ""
8097
8098 #. type: Plain text
8099 #: build/C/man7/svipc.7:91
8100 msgid ""
8101 "Bits 0100, 0010, and 0001 (the execute bits) are unused by the system.  "
8102 "Furthermore, \"write\" effectively means \"alter\" for a semaphore set."
8103 msgstr ""
8104
8105 #. type: Plain text
8106 #: build/C/man7/svipc.7:94
8107 msgid "The same system header file also defines the following symbolic constants:"
8108 msgstr ""
8109
8110 #. type: TP
8111 #: build/C/man7/svipc.7:94
8112 #, no-wrap
8113 msgid "B<IPC_CREAT>"
8114 msgstr ""
8115
8116 #. type: Plain text
8117 #: build/C/man7/svipc.7:97
8118 msgid "Create entry if key doesn't exist."
8119 msgstr ""
8120
8121 #. type: TP
8122 #: build/C/man7/svipc.7:97
8123 #, no-wrap
8124 msgid "B<IPC_EXCL>"
8125 msgstr ""
8126
8127 #. type: Plain text
8128 #: build/C/man7/svipc.7:100
8129 msgid "Fail if key exists."
8130 msgstr ""
8131
8132 #. type: TP
8133 #: build/C/man7/svipc.7:100
8134 #, no-wrap
8135 msgid "B<IPC_NOWAIT>"
8136 msgstr ""
8137
8138 #. type: Plain text
8139 #: build/C/man7/svipc.7:103
8140 msgid "Error if request must wait."
8141 msgstr ""
8142
8143 #. type: TP
8144 #: build/C/man7/svipc.7:103
8145 #, no-wrap
8146 msgid "B<IPC_PRIVATE>"
8147 msgstr ""
8148
8149 #. type: Plain text
8150 #: build/C/man7/svipc.7:106
8151 msgid "Private key."
8152 msgstr ""
8153
8154 #. type: TP
8155 #: build/C/man7/svipc.7:106
8156 #, no-wrap
8157 msgid "B<IPC_RMID>"
8158 msgstr ""
8159
8160 #. type: Plain text
8161 #: build/C/man7/svipc.7:109
8162 msgid "Remove resource."
8163 msgstr ""
8164
8165 #. type: TP
8166 #: build/C/man7/svipc.7:109
8167 #, no-wrap
8168 msgid "B<IPC_SET>"
8169 msgstr ""
8170
8171 #. type: Plain text
8172 #: build/C/man7/svipc.7:112
8173 msgid "Set resource options."
8174 msgstr ""
8175
8176 #. type: TP
8177 #: build/C/man7/svipc.7:112
8178 #, no-wrap
8179 msgid "B<IPC_STAT>"
8180 msgstr ""
8181
8182 #. type: Plain text
8183 #: build/C/man7/svipc.7:115
8184 msgid "Get resource options."
8185 msgstr ""
8186
8187 #. type: Plain text
8188 #: build/C/man7/svipc.7:124
8189 msgid ""
8190 "Note that B<IPC_PRIVATE> is a I<key_t> type, while all the other symbolic "
8191 "constants are flag fields and can be OR'ed into an I<int> type variable."
8192 msgstr ""
8193
8194 #. type: SS
8195 #: build/C/man7/svipc.7:124
8196 #, no-wrap
8197 msgid "Message Queues"
8198 msgstr ""
8199
8200 #. type: Plain text
8201 #: build/C/man7/svipc.7:132
8202 msgid ""
8203 "A message queue is uniquely identified by a positive integer (its I<msqid>)  "
8204 "and has an associated data structure of type I<struct msqid_ds>, defined in "
8205 "I<E<lt>sys/msg.hE<gt>>, containing the following members:"
8206 msgstr ""
8207
8208 #. type: Plain text
8209 #: build/C/man7/svipc.7:145
8210 #, no-wrap
8211 msgid ""
8212 "struct msqid_ds {\n"
8213 "    struct ipc_perm msg_perm;\n"
8214 "    msgqnum_t       msg_qnum;    /* no of messages on queue */\n"
8215 "    msglen_t        msg_qbytes;  /* bytes max on a queue */\n"
8216 "    pid_t           msg_lspid;   /* PID of last msgsnd(2) call */\n"
8217 "    pid_t           msg_lrpid;   /* PID of last msgrcv(2) call */\n"
8218 "    time_t          msg_stime;   /* last msgsnd(2) time */\n"
8219 "    time_t          msg_rtime;   /* last msgrcv(2) time */\n"
8220 "    time_t          msg_ctime;   /* last change time */\n"
8221 "};\n"
8222 msgstr ""
8223
8224 #. type: TP
8225 #: build/C/man7/svipc.7:147
8226 #, no-wrap
8227 msgid "I<msg_perm>"
8228 msgstr ""
8229
8230 #. type: Plain text
8231 #: build/C/man7/svipc.7:152
8232 msgid ""
8233 "I<ipc_perm> structure that specifies the access permissions on the message "
8234 "queue."
8235 msgstr ""
8236
8237 #. type: TP
8238 #: build/C/man7/svipc.7:152
8239 #, no-wrap
8240 msgid "I<msg_qnum>"
8241 msgstr ""
8242
8243 #. type: Plain text
8244 #: build/C/man7/svipc.7:155
8245 msgid "Number of messages currently on the message queue."
8246 msgstr ""
8247
8248 #. type: TP
8249 #: build/C/man7/svipc.7:155
8250 #, no-wrap
8251 msgid "I<msg_qbytes>"
8252 msgstr ""
8253
8254 #. type: Plain text
8255 #: build/C/man7/svipc.7:159
8256 msgid "Maximum number of bytes of message text allowed on the message queue."
8257 msgstr ""
8258
8259 #. type: TP
8260 #: build/C/man7/svipc.7:159
8261 #, no-wrap
8262 msgid "I<msg_lspid>"
8263 msgstr ""
8264
8265 #. type: Plain text
8266 #: build/C/man7/svipc.7:164
8267 msgid "ID of the process that performed the last B<msgsnd>(2)  system call."
8268 msgstr ""
8269
8270 #. type: TP
8271 #: build/C/man7/svipc.7:164
8272 #, no-wrap
8273 msgid "I<msg_lrpid>"
8274 msgstr ""
8275
8276 #. type: Plain text
8277 #: build/C/man7/svipc.7:169
8278 msgid "ID of the process that performed the last B<msgrcv>(2)  system call."
8279 msgstr ""
8280
8281 #. type: TP
8282 #: build/C/man7/svipc.7:169
8283 #, no-wrap
8284 msgid "I<msg_stime>"
8285 msgstr ""
8286
8287 #. type: Plain text
8288 #: build/C/man7/svipc.7:174
8289 msgid "Time of the last B<msgsnd>(2)  system call."
8290 msgstr ""
8291
8292 #. type: TP
8293 #: build/C/man7/svipc.7:174
8294 #, no-wrap
8295 msgid "I<msg_rtime>"
8296 msgstr ""
8297
8298 #. type: Plain text
8299 #: build/C/man7/svipc.7:179
8300 msgid "Time of the last B<msgrcv>(2)  system call."
8301 msgstr ""
8302
8303 #. type: TP
8304 #: build/C/man7/svipc.7:179
8305 #, no-wrap
8306 msgid "I<msg_ctime>"
8307 msgstr ""
8308
8309 #. type: Plain text
8310 #: build/C/man7/svipc.7:185
8311 msgid ""
8312 "Time of the last system call that changed a member of the I<msqid_ds> "
8313 "structure."
8314 msgstr ""
8315
8316 #. type: SS
8317 #: build/C/man7/svipc.7:185
8318 #, no-wrap
8319 msgid "Semaphore Sets"
8320 msgstr ""
8321
8322 #. type: Plain text
8323 #: build/C/man7/svipc.7:193
8324 msgid ""
8325 "A semaphore set is uniquely identified by a positive integer (its I<semid>)  "
8326 "and has an associated data structure of type I<struct semid_ds>, defined in "
8327 "I<E<lt>sys/sem.hE<gt>>, containing the following members:"
8328 msgstr ""
8329
8330 #. type: Plain text
8331 #: build/C/man7/svipc.7:202
8332 #, no-wrap
8333 msgid ""
8334 "struct semid_ds {\n"
8335 "    struct ipc_perm sem_perm;\n"
8336 "    time_t          sem_otime;   /* last operation time */\n"
8337 "    time_t          sem_ctime;   /* last change time */\n"
8338 "    unsigned long   sem_nsems;   /* count of sems in set */\n"
8339 "};\n"
8340 msgstr ""
8341
8342 #. type: TP
8343 #: build/C/man7/svipc.7:204
8344 #, no-wrap
8345 msgid "I<sem_perm>"
8346 msgstr ""
8347
8348 #. type: Plain text
8349 #: build/C/man7/svipc.7:209
8350 msgid ""
8351 "I<ipc_perm> structure that specifies the access permissions on the semaphore "
8352 "set."
8353 msgstr ""
8354
8355 #. type: TP
8356 #: build/C/man7/svipc.7:209
8357 #, no-wrap
8358 msgid "I<sem_otime>"
8359 msgstr ""
8360
8361 #. type: Plain text
8362 #: build/C/man7/svipc.7:214
8363 msgid "Time of last B<semop>(2)  system call."
8364 msgstr ""
8365
8366 #. type: TP
8367 #: build/C/man7/svipc.7:214
8368 #, no-wrap
8369 msgid "I<sem_ctime>"
8370 msgstr ""
8371
8372 #. type: Plain text
8373 #: build/C/man7/svipc.7:220
8374 msgid ""
8375 "Time of last B<semctl>(2)  system call that changed a member of the above "
8376 "structure or of one semaphore belonging to the set."
8377 msgstr ""
8378
8379 #. type: TP
8380 #: build/C/man7/svipc.7:220
8381 #, no-wrap
8382 msgid "I<sem_nsems>"
8383 msgstr ""
8384
8385 #. type: Plain text
8386 #: build/C/man7/svipc.7:228
8387 msgid ""
8388 "Number of semaphores in the set.  Each semaphore of the set is referenced by "
8389 "a nonnegative integer ranging from B<0> to I<sem_nsems-1>."
8390 msgstr ""
8391
8392 #. type: Plain text
8393 #: build/C/man7/svipc.7:232
8394 msgid ""
8395 "A semaphore is a data structure of type I<struct sem> containing the "
8396 "following members:"
8397 msgstr ""
8398
8399 #.     unsigned short semncnt; /* nr awaiting semval to increase */
8400 #.     unsigned short semzcnt; /* nr awaiting semval = 0 */
8401 #. type: Plain text
8402 #: build/C/man7/svipc.7:241
8403 #, no-wrap
8404 msgid ""
8405 "struct sem {\n"
8406 "    int semval;  /* semaphore value */\n"
8407 "    int sempid;  /* PID for last operation */\n"
8408 "};\n"
8409 msgstr ""
8410
8411 #. type: TP
8412 #: build/C/man7/svipc.7:243
8413 #, no-wrap
8414 msgid "I<semval>"
8415 msgstr ""
8416
8417 #. type: Plain text
8418 #: build/C/man7/svipc.7:246
8419 msgid "Semaphore value: a nonnegative integer."
8420 msgstr ""
8421
8422 #. type: TP
8423 #: build/C/man7/svipc.7:246
8424 #, no-wrap
8425 msgid "I<sempid>"
8426 msgstr ""
8427
8428 #. .TP
8429 #. .I semncnt
8430 #. Number of processes suspended awaiting for
8431 #. .I semval
8432 #. to increase.
8433 #. .TP
8434 #. .I semznt
8435 #. Number of processes suspended awaiting for
8436 #. .I semval
8437 #. to become zero.
8438 #. type: Plain text
8439 #: build/C/man7/svipc.7:260
8440 msgid ""
8441 "ID of the last process that performed a semaphore operation on this "
8442 "semaphore."
8443 msgstr ""
8444
8445 #. type: SS
8446 #: build/C/man7/svipc.7:260
8447 #, no-wrap
8448 msgid "Shared Memory Segments"
8449 msgstr ""
8450
8451 #. type: Plain text
8452 #: build/C/man7/svipc.7:268
8453 msgid ""
8454 "A shared memory segment is uniquely identified by a positive integer (its "
8455 "I<shmid>)  and has an associated data structure of type I<struct shmid_ds>, "
8456 "defined in I<E<lt>sys/shm.hE<gt>>, containing the following members:"
8457 msgstr ""
8458
8459 #. type: Plain text
8460 #: build/C/man7/svipc.7:281
8461 #, no-wrap
8462 msgid ""
8463 "struct shmid_ds {\n"
8464 "    struct ipc_perm shm_perm;\n"
8465 "    size_t          shm_segsz;   /* size of segment */\n"
8466 "    pid_t           shm_cpid;    /* PID of creator */\n"
8467 "    pid_t           shm_lpid;    /* PID, last operation */\n"
8468 "    shmatt_t        shm_nattch;  /* no. of current attaches */\n"
8469 "    time_t          shm_atime;   /* time of last attach */\n"
8470 "    time_t          shm_dtime;   /* time of last detach */\n"
8471 "    time_t          shm_ctime;   /* time of last change */\n"
8472 "};\n"
8473 msgstr ""
8474
8475 #. type: TP
8476 #: build/C/man7/svipc.7:283
8477 #, no-wrap
8478 msgid "I<shm_perm>"
8479 msgstr ""
8480
8481 #. type: Plain text
8482 #: build/C/man7/svipc.7:288
8483 msgid ""
8484 "I<ipc_perm> structure that specifies the access permissions on the shared "
8485 "memory segment."
8486 msgstr ""
8487
8488 #. type: TP
8489 #: build/C/man7/svipc.7:288
8490 #, no-wrap
8491 msgid "I<shm_segsz>"
8492 msgstr ""
8493
8494 #. type: Plain text
8495 #: build/C/man7/svipc.7:291
8496 msgid "Size in bytes of the shared memory segment."
8497 msgstr ""
8498
8499 #. type: TP
8500 #: build/C/man7/svipc.7:291
8501 #, no-wrap
8502 msgid "I<shm_cpid>"
8503 msgstr ""
8504
8505 #. type: Plain text
8506 #: build/C/man7/svipc.7:294
8507 msgid "ID of the process that created the shared memory segment."
8508 msgstr ""
8509
8510 #. type: TP
8511 #: build/C/man7/svipc.7:294
8512 #, no-wrap
8513 msgid "I<shm_lpid>"
8514 msgstr ""
8515
8516 #. type: Plain text
8517 #: build/C/man7/svipc.7:301
8518 msgid ""
8519 "ID of the last process that executed a B<shmat>(2)  or B<shmdt>(2)  system "
8520 "call."
8521 msgstr ""
8522
8523 #. type: TP
8524 #: build/C/man7/svipc.7:301
8525 #, no-wrap
8526 msgid "I<shm_nattch>"
8527 msgstr ""
8528
8529 #. type: Plain text
8530 #: build/C/man7/svipc.7:304
8531 msgid "Number of current alive attaches for this shared memory segment."
8532 msgstr ""
8533
8534 #. type: TP
8535 #: build/C/man7/svipc.7:304
8536 #, no-wrap
8537 msgid "I<shm_atime>"
8538 msgstr ""
8539
8540 #. type: Plain text
8541 #: build/C/man7/svipc.7:309
8542 msgid "Time of the last B<shmat>(2)  system call."
8543 msgstr ""
8544
8545 #. type: TP
8546 #: build/C/man7/svipc.7:309
8547 #, no-wrap
8548 msgid "I<shm_dtime>"
8549 msgstr ""
8550
8551 #. type: Plain text
8552 #: build/C/man7/svipc.7:314
8553 msgid "Time of the last B<shmdt>(2)  system call."
8554 msgstr ""
8555
8556 #. type: TP
8557 #: build/C/man7/svipc.7:314
8558 #, no-wrap
8559 msgid "I<shm_ctime>"
8560 msgstr ""
8561
8562 #. type: Plain text
8563 #: build/C/man7/svipc.7:320
8564 msgid "Time of the last B<shmctl>(2)  system call that changed I<shmid_ds>."
8565 msgstr ""
8566
8567 #. type: Plain text
8568 #: build/C/man7/svipc.7:334
8569 msgid ""
8570 "B<ipc>(2), B<msgctl>(2), B<msgget>(2), B<msgrcv>(2), B<msgsnd>(2), "
8571 "B<semctl>(2), B<semget>(2), B<semop>(2), B<shmat>(2), B<shmctl>(2), "
8572 "B<shmdt>(2), B<shmget>(2), B<ftok>(3)"
8573 msgstr ""
8574
8575 #. type: TH
8576 #: build/C/man3/ulimit.3:27
8577 #, no-wrap
8578 msgid "ULIMIT"
8579 msgstr ""
8580
8581 #. type: TH
8582 #: build/C/man3/ulimit.3:27
8583 #, no-wrap
8584 msgid "2008-08-06"
8585 msgstr ""
8586
8587 #. type: Plain text
8588 #: build/C/man3/ulimit.3:30
8589 msgid "ulimit - get and set user limits"
8590 msgstr ""
8591
8592 #. type: Plain text
8593 #: build/C/man3/ulimit.3:32
8594 msgid "B<#include E<lt>ulimit.hE<gt>>"
8595 msgstr ""
8596
8597 #. type: Plain text
8598 #: build/C/man3/ulimit.3:34
8599 msgid "B<long ulimit(int >I<cmd>B<, long >I<newlimit>B<);>"
8600 msgstr ""
8601
8602 #. type: Plain text
8603 #: build/C/man3/ulimit.3:46
8604 msgid ""
8605 "Warning: This routine is obsolete.  Use B<getrlimit>(2), B<setrlimit>(2), "
8606 "and B<sysconf>(3)  instead.  For the shell command B<ulimit>(), see "
8607 "B<bash>(1)."
8608 msgstr ""
8609
8610 #. type: Plain text
8611 #: build/C/man3/ulimit.3:53
8612 msgid ""
8613 "The B<ulimit>()  call will get or set some limit for the calling process.  "
8614 "The I<cmd> argument can have one of the following values."
8615 msgstr ""
8616
8617 #. type: TP
8618 #: build/C/man3/ulimit.3:53
8619 #, no-wrap
8620 msgid "B<UL_GETFSIZE>"
8621 msgstr ""
8622
8623 #. type: Plain text
8624 #: build/C/man3/ulimit.3:56
8625 msgid "Return the limit on the size of a file, in units of 512 bytes."
8626 msgstr ""
8627
8628 #. type: TP
8629 #: build/C/man3/ulimit.3:56
8630 #, no-wrap
8631 msgid "B<UL_SETFSIZE>"
8632 msgstr ""
8633
8634 #. type: Plain text
8635 #: build/C/man3/ulimit.3:59
8636 msgid "Set the limit on the size of a file."
8637 msgstr ""
8638
8639 #. type: TP
8640 #: build/C/man3/ulimit.3:59
8641 #, no-wrap
8642 msgid "B<3>"
8643 msgstr ""
8644
8645 #. type: Plain text
8646 #: build/C/man3/ulimit.3:63
8647 msgid ""
8648 "(Not implemented for Linux.)  Return the maximum possible address of the "
8649 "data segment."
8650 msgstr ""
8651
8652 #. type: TP
8653 #: build/C/man3/ulimit.3:63
8654 #, no-wrap
8655 msgid "B<4>"
8656 msgstr ""
8657
8658 #. type: Plain text
8659 #: build/C/man3/ulimit.3:67
8660 msgid ""
8661 "(Implemented but no symbolic constant provided.)  Return the maximum number "
8662 "of files that the calling process can open."
8663 msgstr ""
8664
8665 #. type: Plain text
8666 #: build/C/man3/ulimit.3:74
8667 msgid ""
8668 "On success, B<ulimit>()  returns a nonnegative value.  On error, -1 is "
8669 "returned, and I<errno> is set appropriately."
8670 msgstr ""
8671
8672 #. type: Plain text
8673 #: build/C/man3/ulimit.3:78
8674 msgid "A unprivileged process tried to increase a limit."
8675 msgstr ""
8676
8677 #. type: Plain text
8678 #: build/C/man3/ulimit.3:83
8679 msgid "SVr4, POSIX.1-2001.  POSIX.1-2008 marks B<ulimit>()  as obsolete."
8680 msgstr ""
8681
8682 #. type: Plain text
8683 #: build/C/man3/ulimit.3:88
8684 msgid "B<bash>(1), B<getrlimit>(2), B<setrlimit>(2), B<sysconf>(3)"
8685 msgstr ""