OSDN Git Service

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