OSDN Git Service

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