OSDN Git Service

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