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.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2013-08-15 19:32+0900\n"
10 "PO-Revision-Date: 2013-07-22 04:34+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
19 #: build/C/man3/CPU_SET.3:27
25 #: build/C/man3/CPU_SET.3:27
31 #: build/C/man3/CPU_SET.3:27 build/C/man2/clone.2:45 build/C/man2/kcmp.2:28
32 #: build/C/man2/sched_get_priority_max.2:29 build/C/man3/sched_getcpu.3:26
33 #: build/C/man2/sched_rr_get_interval.2:29 build/C/man2/sched_setaffinity.2:34
34 #: build/C/man2/sched_setparam.2:30 build/C/man2/sched_setscheduler.2:46
35 #: build/C/man2/sched_yield.2:29 build/C/man2/setns.2:8
36 #: build/C/man2/unshare.2:20
42 #: build/C/man3/CPU_SET.3:27 build/C/man2/clone.2:45 build/C/man2/kcmp.2:28
43 #: build/C/man2/sched_get_priority_max.2:29 build/C/man3/sched_getcpu.3:26
44 #: build/C/man2/sched_rr_get_interval.2:29 build/C/man2/sched_setaffinity.2:34
45 #: build/C/man2/sched_setparam.2:30 build/C/man2/sched_setscheduler.2:46
46 #: build/C/man2/sched_yield.2:29 build/C/man2/setns.2:8
47 #: build/C/man2/unshare.2:20
49 msgid "Linux Programmer's Manual"
50 msgstr "Linux Programmer's Manual"
53 #: build/C/man3/CPU_SET.3:28 build/C/man2/clone.2:46 build/C/man2/kcmp.2:29
54 #: build/C/man2/sched_get_priority_max.2:30 build/C/man3/sched_getcpu.3:27
55 #: build/C/man2/sched_rr_get_interval.2:30 build/C/man2/sched_setaffinity.2:35
56 #: build/C/man2/sched_setparam.2:31 build/C/man2/sched_setscheduler.2:47
57 #: build/C/man2/sched_yield.2:30 build/C/man2/setns.2:9
58 #: build/C/man2/unshare.2:21
64 #: build/C/man3/CPU_SET.3:35
66 "CPU_SET, CPU_CLR, CPU_ISSET, CPU_ZERO, CPU_COUNT, CPU_AND, CPU_OR, CPU_XOR, "
67 "CPU_EQUAL, CPU_ALLOC, CPU_ALLOC_SIZE, CPU_FREE, CPU_SET_S, CPU_CLR_S, "
68 "CPU_ISSET_S, CPU_ZERO_S, CPU_COUNT_S, CPU_AND_S, CPU_OR_S, CPU_XOR_S, "
69 "CPU_EQUAL_S - macros for manipulating CPU sets"
73 #: build/C/man3/CPU_SET.3:35 build/C/man2/clone.2:48 build/C/man2/kcmp.2:31
74 #: build/C/man2/sched_get_priority_max.2:32 build/C/man3/sched_getcpu.3:29
75 #: build/C/man2/sched_rr_get_interval.2:32 build/C/man2/sched_setaffinity.2:38
76 #: build/C/man2/sched_setparam.2:33 build/C/man2/sched_setscheduler.2:50
77 #: build/C/man2/sched_yield.2:32 build/C/man2/setns.2:11
78 #: build/C/man2/unshare.2:23
84 #: build/C/man3/CPU_SET.3:39 build/C/man2/sched_setaffinity.2:42
85 #: build/C/man2/setns.2:15
88 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
89 "B<#include E<lt>sched.hE<gt>>\n"
91 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
92 "B<#include E<lt>sched.hE<gt>>\n"
95 #: build/C/man3/CPU_SET.3:41
97 msgid "B<void CPU_ZERO(cpu_set_t *>I<set>B<);>\n"
98 msgstr "B<void CPU_ZERO(cpu_set_t *>I<set>B<);>\n"
101 #: build/C/man3/CPU_SET.3:45
104 "B<void CPU_SET(int >I<cpu>B<, cpu_set_t *>I<set>B<);>\n"
105 "B<void CPU_CLR(int >I<cpu>B<, cpu_set_t *>I<set>B<);>\n"
106 "B<int CPU_ISSET(int >I<cpu>B<, cpu_set_t *>I<set>B<);>\n"
108 "B<void CPU_SET(int >I<cpu>B<, cpu_set_t *>I<set>B<);>\n"
109 "B<void CPU_CLR(int >I<cpu>B<, cpu_set_t *>I<set>B<);>\n"
110 "B<int CPU_ISSET(int >I<cpu>B<, cpu_set_t *>I<set>B<);>\n"
113 #: build/C/man3/CPU_SET.3:47
115 msgid "B<int CPU_COUNT(cpu_set_t *>I<set>B<);>\n"
116 msgstr "B<int CPU_COUNT(cpu_set_t *>I<set>B<);>\n"
119 #: build/C/man3/CPU_SET.3:54
122 "B<void CPU_AND(cpu_set_t *>I<destset>B<,>\n"
123 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
124 "B<void CPU_OR(cpu_set_t *>I<destset>B<,>\n"
125 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
126 "B<void CPU_XOR(cpu_set_t *>I<destset>B<,>\n"
127 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
129 "B<void CPU_AND(cpu_set_t *>I<destset>B<,>\n"
130 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
131 "B<void CPU_OR(cpu_set_t *>I<destset>B<,>\n"
132 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
133 "B<void CPU_XOR(cpu_set_t *>I<destset>B<,>\n"
134 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
137 #: build/C/man3/CPU_SET.3:56
139 msgid "B<int CPU_EQUAL(cpu_set_t *>I<set1>B<, cpu_set_t *>I<set2>B<);>\n"
140 msgstr "B<int CPU_EQUAL(cpu_set_t *>I<set1>B<, cpu_set_t *>I<set2>B<);>\n"
143 #: build/C/man3/CPU_SET.3:60
146 "B<cpu_set_t *CPU_ALLOC(int >I<num_cpus>B<);>\n"
147 "B<void CPU_FREE(cpu_set_t *>I<set>B<);>\n"
148 "B<size_t CPU_ALLOC_SIZE(int >I<num_cpus>B<);>\n"
150 "B<cpu_set_t *CPU_ALLOC(int >I<num_cpus>B<);>\n"
151 "B<void CPU_FREE(cpu_set_t *>I<set>B<);>\n"
152 "B<size_t CPU_ALLOC_SIZE(int >I<num_cpus>B<);>\n"
155 #: build/C/man3/CPU_SET.3:62
157 msgid "B<void CPU_ZERO_S(size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
158 msgstr "B<void CPU_ZERO_S(size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
161 #: build/C/man3/CPU_SET.3:66
164 "B<void CPU_SET_S(int >I<cpu>B<, size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
165 "B<void CPU_CLR_S(int >I<cpu>B<, size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
166 "B<int CPU_ISSET_S(int >I<cpu>B<, size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
168 "B<void CPU_SET_S(int >I<cpu>B<, size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
169 "B<void CPU_CLR_S(int >I<cpu>B<, size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
170 "B<int CPU_ISSET_S(int >I<cpu>B<, size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
173 #: build/C/man3/CPU_SET.3:68
175 msgid "B<int CPU_COUNT_S(size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
176 msgstr "B<int CPU_COUNT_S(size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
179 #: build/C/man3/CPU_SET.3:75
182 "B<void CPU_AND_S(size_t >I<setsize>B<, cpu_set_t *>I<destset>B<,>\n"
183 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
184 "B<void CPU_OR_S(size_t >I<setsize>B<, cpu_set_t *>I<destset>B<,>\n"
185 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
186 "B<void CPU_XOR_S(size_t >I<setsize>B<, cpu_set_t *>I<destset>B<,>\n"
187 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
189 "B<void CPU_AND_S(size_t >I<setsize>B<, cpu_set_t *>I<destset>B<,>\n"
190 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
191 "B<void CPU_OR_S(size_t >I<setsize>B<, cpu_set_t *>I<destset>B<,>\n"
192 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
193 "B<void CPU_XOR_S(size_t >I<setsize>B<, cpu_set_t *>I<destset>B<,>\n"
194 "B< cpu_set_t *>I<srcset1>B<, cpu_set_t *>I<srcset2>B<);>\n"
197 #: build/C/man3/CPU_SET.3:78
199 msgid "B<int CPU_EQUAL_S(size_t >I<setsize>B<, cpu_set_t *>I<set1>B<, cpu_set_t *>I<set2>B<);>\n"
200 msgstr "B<int CPU_EQUAL_S(size_t >I<setsize>B<, cpu_set_t *>I<set1>B<, cpu_set_t *>I<set2>B<);>\n"
203 #: build/C/man3/CPU_SET.3:79 build/C/man2/clone.2:86 build/C/man2/kcmp.2:41
204 #: build/C/man2/sched_get_priority_max.2:38 build/C/man3/sched_getcpu.3:55
205 #: build/C/man2/sched_rr_get_interval.2:36 build/C/man2/sched_setaffinity.2:49
206 #: build/C/man2/sched_setparam.2:47 build/C/man2/sched_setscheduler.2:66
207 #: build/C/man2/sched_yield.2:36 build/C/man2/setns.2:18
208 #: build/C/man2/unshare.2:50
214 #: build/C/man3/CPU_SET.3:86
216 "The I<cpu_set_t> data structure represents a set of CPUs. CPU sets are used "
217 "by B<sched_setaffinity>(2) and similar interfaces."
221 #: build/C/man3/CPU_SET.3:93
223 "The I<cpu_set_t> data type is implemented as a bitset. However, the data "
224 "structure treated as considered opaque: all manipulation of CPU sets should "
225 "be done via the macros described in this page."
229 #: build/C/man3/CPU_SET.3:96
230 msgid "The following macros are provided to operate on the CPU set I<set>:"
234 #: build/C/man3/CPU_SET.3:96
236 msgid "B<CPU_ZERO>()"
237 msgstr "B<CPU_ZERO>()"
240 #: build/C/man3/CPU_SET.3:101
241 msgid "Clears I<set>, so that it contains no CPUs."
245 #: build/C/man3/CPU_SET.3:101
248 msgstr "B<CPU_SET>()"
251 #: build/C/man3/CPU_SET.3:107
252 msgid "Add CPU I<cpu> to I<set>."
256 #: build/C/man3/CPU_SET.3:107
259 msgstr "B<CPU_CLR>()"
262 #: build/C/man3/CPU_SET.3:113
263 msgid "Remove CPU I<cpu> from I<set>."
267 #: build/C/man3/CPU_SET.3:113
269 msgid "B<CPU_ISSET>()"
270 msgstr "B<CPU_ISSET>()"
273 #: build/C/man3/CPU_SET.3:119
274 msgid "Test to see if CPU I<cpu> is a member of I<set>."
278 #: build/C/man3/CPU_SET.3:119
280 msgid "B<CPU_COUNT>()"
281 msgstr "B<CPU_COUNT>()"
284 #: build/C/man3/CPU_SET.3:123
285 msgid "Return the number of CPUs in I<set>."
289 #: build/C/man3/CPU_SET.3:128
291 "Where a I<cpu> argument is specified, it should not produce side effects, "
292 "since the above macros may evaluate the argument more than once."
296 #: build/C/man3/CPU_SET.3:139
298 "The first available CPU on the system corresponds to a I<cpu> value of 0, "
299 "the next CPU corresponds to a I<cpu> value of 1, and so on. The constant "
300 "B<CPU_SETSIZE> (currently 1024) specifies a value one greater than the "
301 "maximum CPU number that can be stored in I<cpu_set_t>."
305 #: build/C/man3/CPU_SET.3:141
306 msgid "The following macros perform logical operations on CPU sets:"
310 #: build/C/man3/CPU_SET.3:141
313 msgstr "B<CPU_AND>()"
316 #: build/C/man3/CPU_SET.3:150
318 "Store the intersection of the sets I<srcset1> and I<srcset2> in I<destset> "
319 "(which may be one of the source sets)."
323 #: build/C/man3/CPU_SET.3:150
329 #: build/C/man3/CPU_SET.3:159
331 "Store the union of the sets I<srcset1> and I<srcset2> in I<destset> (which "
332 "may be one of the source sets)."
336 #: build/C/man3/CPU_SET.3:159
339 msgstr "B<CPU_XOR>()"
342 #: build/C/man3/CPU_SET.3:173
344 "Store the XOR of the sets I<srcset1> and I<srcset2> in I<destset> (which may "
345 "be one of the source sets). The XOR means the set of CPUs that are in "
346 "either I<srcset1> or I<srcset2>, but not both."
350 #: build/C/man3/CPU_SET.3:173
352 msgid "B<CPU_EQUAL>()"
353 msgstr "B<CPU_EQUAL>()"
356 #: build/C/man3/CPU_SET.3:176
357 msgid "Test whether two CPU set contain exactly the same CPUs."
361 #: build/C/man3/CPU_SET.3:176
363 msgid "Dynamically sized CPU sets"
367 #: build/C/man3/CPU_SET.3:182
369 "Because some applications may require the ability to dynamically size CPU "
370 "sets (e.g., to allocate sets larger than that defined by the standard "
371 "I<cpu_set_t> data type), glibc nowadays provides a set of macros to support "
376 #: build/C/man3/CPU_SET.3:184
377 msgid "The following macros are used to allocate and deallocate CPU sets:"
381 #: build/C/man3/CPU_SET.3:184
383 msgid "B<CPU_ALLOC>()"
384 msgstr "B<CPU_ALLOC>()"
387 #: build/C/man3/CPU_SET.3:189
389 "Allocate a CPU set large enough to hold CPUs in the range 0 to I<num_cpus-1>."
393 #: build/C/man3/CPU_SET.3:189
395 msgid "B<CPU_ALLOC_SIZE>()"
396 msgstr "B<CPU_ALLOC_SIZE>()"
399 #: build/C/man3/CPU_SET.3:199
401 "Return the size in bytes of the CPU set that would be needed to hold CPUs in "
402 "the range 0 to I<num_cpus-1>. This macro provides the value that can be "
403 "used for the I<setsize> argument in the B<CPU_*_S>() macros described below."
407 #: build/C/man3/CPU_SET.3:199
409 msgid "B<CPU_FREE>()"
410 msgstr "B<CPU_FREE>()"
413 #: build/C/man3/CPU_SET.3:203
414 msgid "Free a CPU set previously allocated by B<CPU_ALLOC>()."
418 #: build/C/man3/CPU_SET.3:210
420 "The macros whose names end with \"_S\" are the analogs of the similarly "
421 "named macros without the suffix. These macros perform the same tasks as "
422 "their analogs, but operate on the dynamically allocated CPU set(s) whose "
423 "size is I<setsize> bytes."
427 #: build/C/man3/CPU_SET.3:210 build/C/man2/clone.2:874 build/C/man2/kcmp.2:124
428 #: build/C/man2/sched_get_priority_max.2:98 build/C/man3/sched_getcpu.3:58
429 #: build/C/man2/sched_rr_get_interval.2:73
430 #: build/C/man2/sched_setaffinity.2:107 build/C/man2/sched_setparam.2:87
431 #: build/C/man2/sched_setscheduler.2:422 build/C/man2/sched_yield.2:41
432 #: build/C/man2/setns.2:70 build/C/man2/unshare.2:207
438 #: build/C/man3/CPU_SET.3:219
440 "B<CPU_ISSET>() and B<CPU_ISSET_S>() return nonzero if I<cpu> is in I<set>; "
441 "otherwise, it returns 0."
445 #: build/C/man3/CPU_SET.3:225
447 "B<CPU_COUNT>() and B<CPU_COUNT_S>() return the number of CPUs in I<set>."
451 #: build/C/man3/CPU_SET.3:230
453 "B<CPU_EQUAL>() and B<CPU_EQUAL_S>() return nonzero if the two CPU sets are "
454 "equal; otherwise it returns 0."
458 #: build/C/man3/CPU_SET.3:235
460 "B<CPU_ALLOC>() returns a pointer on success, or NULL on failure. (Errors "
461 "are as for B<malloc>(3).)"
465 #: build/C/man3/CPU_SET.3:239
467 "B<CPU_ALLOC_SIZE>() returns the number of bytes required to store a CPU set "
468 "of the specified cardinality."
472 #: build/C/man3/CPU_SET.3:241
473 msgid "The other functions do not return a value."
477 #: build/C/man3/CPU_SET.3:241 build/C/man2/clone.2:991 build/C/man2/kcmp.2:195
478 #: build/C/man3/sched_getcpu.3:70 build/C/man2/sched_setaffinity.2:148
479 #: build/C/man2/setns.2:97 build/C/man2/unshare.2:224
485 #: build/C/man3/CPU_SET.3:249
487 "The B<CPU_ZERO>(), B<CPU_SET>(), B<CPU_CLR>(), and B<CPU_ISSET>() macros "
488 "were added in glibc 2.3.3."
492 #: build/C/man3/CPU_SET.3:252
493 msgid "B<CPU_COUNT>() first appeared in glibc 2.6."
497 #: build/C/man3/CPU_SET.3:270
499 "B<CPU_AND>(), B<CPU_OR>(), B<CPU_XOR>(), B<CPU_EQUAL>(), B<CPU_ALLOC>(), "
500 "B<CPU_ALLOC_SIZE>(), B<CPU_FREE>(), B<CPU_ZERO_S>(), B<CPU_SET_S>(), "
501 "B<CPU_CLR_S>(), B<CPU_ISSET_S>(), B<CPU_AND_S>(), B<CPU_OR_S>(), B<CPU_XOR_S>"
502 "(), and B<CPU_EQUAL_S>() first appeared in glibc 2.7."
506 #: build/C/man3/CPU_SET.3:270 build/C/man2/clone.2:998 build/C/man2/kcmp.2:199
507 #: build/C/man2/sched_get_priority_max.2:114 build/C/man3/sched_getcpu.3:72
508 #: build/C/man2/sched_rr_get_interval.2:94
509 #: build/C/man2/sched_setaffinity.2:159 build/C/man2/sched_setparam.2:110
510 #: build/C/man2/sched_setscheduler.2:444 build/C/man2/sched_yield.2:52
511 #: build/C/man2/setns.2:102 build/C/man2/unshare.2:228
513 msgid "CONFORMING TO"
517 #: build/C/man3/CPU_SET.3:272
518 msgid "These interfaces are Linux-specific."
522 #: build/C/man3/CPU_SET.3:272 build/C/man2/clone.2:1002
523 #: build/C/man2/kcmp.2:202 build/C/man3/sched_getcpu.3:75
524 #: build/C/man2/sched_rr_get_interval.2:96
525 #: build/C/man2/sched_setaffinity.2:161 build/C/man2/sched_setparam.2:112
526 #: build/C/man2/sched_setscheduler.2:447 build/C/man2/sched_yield.2:54
527 #: build/C/man2/setns.2:106 build/C/man2/unshare.2:232
533 #: build/C/man3/CPU_SET.3:275
534 msgid "To duplicate a CPU set, use B<memcpy>(3)."
538 #: build/C/man3/CPU_SET.3:282
540 "Since CPU sets are bitsets allocated in units of long words, the actual "
541 "number of CPUs in a dynamically allocated CPU set will be rounded up to the "
542 "next multiple of I<sizeof(unsigned long)>. An application should consider "
543 "the contents of these extra bits to be undefined."
547 #: build/C/man3/CPU_SET.3:294
549 "Notwithstanding the similarity in the names, note that the constant "
550 "B<CPU_SETSIZE> indicates the number of CPUs in the I<cpu_set_t> data type "
551 "(thus, it is effectively a count of bits in the bitset), while the "
552 "I<setsize> argument of the B<CPU_*_S>() macros is a size in bytes."
556 #: build/C/man3/CPU_SET.3:300
558 "The data types for arguments and return values shown in the SYNOPSIS are "
559 "hints what about is expected in each case. However, since these interfaces "
560 "are implemented as macros, the compiler won't necessarily catch all type "
561 "errors if you violate the suggestions."
565 #: build/C/man3/CPU_SET.3:300 build/C/man2/clone.2:1027
566 #: build/C/man2/sched_setscheduler.2:530
571 #. http://sourceware.org/bugzilla/show_bug.cgi?id=7029
573 #: build/C/man3/CPU_SET.3:312
575 "On 32-bit platforms with glibc 2.8 and earlier, B<CPU_ALLOC>() allocates "
576 "twice as much space as is required, and B<CPU_ALLOC_SIZE>() returns a value "
577 "twice as large as it should. This bug should not affect the semantics of a "
578 "program, but does result in wasted memory and less efficient operation of "
579 "the macros that operate on dynamically allocated CPU sets. These bugs are "
580 "fixed in glibc 2.9."
584 #: build/C/man3/CPU_SET.3:312 build/C/man2/clone.2:1069
585 #: build/C/man2/setns.2:112
591 #: build/C/man3/CPU_SET.3:315
593 "The following program demonstrates the use of some of the macros used for "
594 "dynamically allocated CPU sets."
598 #: build/C/man3/CPU_SET.3:323
601 "#define _GNU_SOURCE\n"
602 "#include E<lt>sched.hE<gt>\n"
603 "#include E<lt>stdlib.hE<gt>\n"
604 "#include E<lt>unistd.hE<gt>\n"
605 "#include E<lt>stdio.hE<gt>\n"
606 "#include E<lt>assert.hE<gt>\n"
608 "#define _GNU_SOURCE\n"
609 "#include E<lt>sched.hE<gt>\n"
610 "#include E<lt>stdlib.hE<gt>\n"
611 "#include E<lt>unistd.hE<gt>\n"
612 "#include E<lt>stdio.hE<gt>\n"
613 "#include E<lt>assert.hE<gt>\n"
616 #: build/C/man3/CPU_SET.3:330
620 "main(int argc, char *argv[])\n"
622 " cpu_set_t *cpusetp;\n"
624 " int num_cpus, cpu;\n"
627 "main(int argc, char *argv[])\n"
629 " cpu_set_t *cpusetp;\n"
631 " int num_cpus, cpu;\n"
634 #: build/C/man3/CPU_SET.3:335
637 " if (argc E<lt> 2) {\n"
638 " fprintf(stderr, \"Usage: %s E<lt>num-cpusE<gt>\\en\", argv[0]);\n"
639 " exit(EXIT_FAILURE);\n"
642 " if (argc E<lt> 2) {\n"
643 " fprintf(stderr, \"Usage: %s E<lt>num-cpusE<gt>\\en\", argv[0]);\n"
644 " exit(EXIT_FAILURE);\n"
648 #: build/C/man3/CPU_SET.3:337
650 msgid " num_cpus = atoi(argv[1]);\n"
651 msgstr " num_cpus = atoi(argv[1]);\n"
654 #: build/C/man3/CPU_SET.3:343
657 " cpusetp = CPU_ALLOC(num_cpus);\n"
658 " if (cpusetp == NULL) {\n"
659 " perror(\"CPU_ALLOC\");\n"
660 " exit(EXIT_FAILURE);\n"
663 " cpusetp = CPU_ALLOC(num_cpus);\n"
664 " if (cpusetp == NULL) {\n"
665 " perror(\"CPU_ALLOC\");\n"
666 " exit(EXIT_FAILURE);\n"
670 #: build/C/man3/CPU_SET.3:345
672 msgid " size = CPU_ALLOC_SIZE(num_cpus);\n"
673 msgstr " size = CPU_ALLOC_SIZE(num_cpus);\n"
676 #: build/C/man3/CPU_SET.3:349
679 " CPU_ZERO_S(size, cpusetp);\n"
680 " for (cpu = 0; cpu E<lt> num_cpus; cpu += 2)\n"
681 " CPU_SET_S(cpu, size, cpusetp);\n"
683 " CPU_ZERO_S(size, cpusetp);\n"
684 " for (cpu = 0; cpu E<lt> num_cpus; cpu += 2)\n"
685 " CPU_SET_S(cpu, size, cpusetp);\n"
688 #: build/C/man3/CPU_SET.3:351
690 msgid " printf(\"CPU_COUNT() of set: %d\\en\", CPU_COUNT_S(size, cpusetp));\n"
691 msgstr " printf(\"CPU_COUNT() of set: %d\\en\", CPU_COUNT_S(size, cpusetp));\n"
694 #: build/C/man3/CPU_SET.3:355
697 " CPU_FREE(cpusetp);\n"
698 " exit(EXIT_SUCCESS);\n"
701 " CPU_FREE(cpusetp);\n"
702 " exit(EXIT_SUCCESS);\n"
706 #: build/C/man3/CPU_SET.3:356 build/C/man2/clone.2:1167
707 #: build/C/man2/kcmp.2:219 build/C/man2/sched_get_priority_max.2:116
708 #: build/C/man3/sched_getcpu.3:95 build/C/man2/sched_rr_get_interval.2:132
709 #: build/C/man2/sched_setaffinity.2:214 build/C/man2/sched_setparam.2:118
710 #: build/C/man2/sched_setscheduler.2:538 build/C/man2/sched_yield.2:79
711 #: build/C/man2/setns.2:199 build/C/man2/unshare.2:266
717 #: build/C/man3/CPU_SET.3:361
719 "B<sched_setaffinity>(2), B<pthread_attr_setaffinity_np>(3), "
720 "B<pthread_setaffinity_np>(3), B<cpuset>(7)"
722 "B<sched_setaffinity>(2), B<pthread_attr_setaffinity_np>(3), "
723 "B<pthread_setaffinity_np>(3), B<cpuset>(7)"
726 #: build/C/man3/CPU_SET.3:361 build/C/man2/clone.2:1181
727 #: build/C/man2/kcmp.2:222 build/C/man2/sched_get_priority_max.2:128
728 #: build/C/man3/sched_getcpu.3:97 build/C/man2/sched_rr_get_interval.2:138
729 #: build/C/man2/sched_setaffinity.2:233 build/C/man2/sched_setparam.2:134
730 #: build/C/man2/sched_setscheduler.2:566 build/C/man2/sched_yield.2:85
731 #: build/C/man2/setns.2:205 build/C/man2/unshare.2:275
737 #: build/C/man3/CPU_SET.3:368 build/C/man2/clone.2:1188
738 #: build/C/man2/kcmp.2:229 build/C/man2/sched_get_priority_max.2:135
739 #: build/C/man3/sched_getcpu.3:104 build/C/man2/sched_rr_get_interval.2:145
740 #: build/C/man2/sched_setaffinity.2:240 build/C/man2/sched_setparam.2:141
741 #: build/C/man2/sched_setscheduler.2:573 build/C/man2/sched_yield.2:92
742 #: build/C/man2/setns.2:212 build/C/man2/unshare.2:282
745 #| "This page is part of release 3.52 of the Linux I<man-pages> project. A "
746 #| "description of the project, and information about reporting bugs, can be "
747 #| "found at \\%http://www.kernel.org/doc/man-pages/."
749 "This page is part of release 3.53 of the Linux I<man-pages> project. A "
750 "description of the project, and information about reporting bugs, can be "
751 "found at \\%http://www.kernel.org/doc/man-pages/."
753 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.52 の一部\n"
754 "である。プロジェクトの説明とバグ報告に関する情報は\n"
755 "http://www.kernel.org/doc/man-pages/ に書かれている。"
758 #: build/C/man2/clone.2:45
764 #: build/C/man2/clone.2:45
770 #: build/C/man2/clone.2:48
771 msgid "clone, __clone2 - create a child process"
772 msgstr "clone, __clone2 - 子プロセスを作成する"
775 #: build/C/man2/clone.2:51
777 msgid "/* Prototype for the glibc wrapper function */\n"
778 msgstr "/* glibc ラッパー関数のプロトタイプ */\n"
781 #: build/C/man2/clone.2:53 build/C/man3/sched_getcpu.3:32
782 #: build/C/man2/sched_setparam.2:36 build/C/man2/sched_setscheduler.2:53
783 #: build/C/man2/unshare.2:26
785 msgid "B<#include E<lt>sched.hE<gt>>\n"
786 msgstr "B<#include E<lt>sched.hE<gt>>\n"
789 #: build/C/man2/clone.2:58
792 "B<int clone(int (*>I<fn>B<)(void *), void *>I<child_stack>B<,>\n"
793 "B< int >I<flags>B<, void *>I<arg>B<, ... >\n"
794 "B< /* pid_t *>I<ptid>B<, struct user_desc *>I<tls>B<, pid_t *>I<ctid>B< */ );>\n"
796 "B<int clone(int (*>I<fn>B<)(void *), void *>I<child_stack>B<,>\n"
797 "B< int >I<flags>B<, void *>I<arg>B<, ... >\n"
798 "B< /* pid_t *>I<ptid>B<, struct user_desc *>I<tls>B<, pid_t *>I<ctid>B< */ );>\n"
801 #: build/C/man2/clone.2:60
803 msgid "/* Prototype for the raw system call */\n"
804 msgstr "/* 素のシステムコールのプロトタイプ */\n"
807 #: build/C/man2/clone.2:64
810 "B<long clone(unsigned long >I<flags>B<, void *>I<child_stack>B<,>\n"
811 "B< void *>I<ptid>B<, void *>I<ctid>B<,>\n"
812 "B< struct pt_regs *>I<regs>B<);>\n"
814 "B<long clone(unsigned long >I<flags>B<, void *>I<child_stack>B<,>\n"
815 "B< void *>I<ptid>B<, void *>I<ctid>B<,>\n"
816 "B< struct pt_regs *>I<regs>B<);>\n"
819 #: build/C/man2/clone.2:69
821 "Feature Test Macro Requirements for glibc wrapper function (see "
822 "B<feature_test_macros>(7)):"
824 "glibc ラッパー関数の機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
827 #: build/C/man2/clone.2:72
832 #: build/C/man2/clone.2:75 build/C/man3/sched_getcpu.3:45
833 #: build/C/man2/unshare.2:39
835 msgid "Since glibc 2.14:"
836 msgstr "glibc 2.14 以降:"
839 #: build/C/man2/clone.2:78 build/C/man3/sched_getcpu.3:48
840 #: build/C/man2/unshare.2:42
844 #. FIXME See http://sources.redhat.com/bugzilla/show_bug.cgi?id=4749
846 #: build/C/man2/clone.2:78 build/C/man3/sched_getcpu.3:48
847 #: build/C/man2/unshare.2:42
849 msgid "Before glibc 2.14:"
850 msgstr "glibc 2.14 より前:"
853 #: build/C/man2/clone.2:83 build/C/man3/sched_getcpu.3:52
854 #: build/C/man2/unshare.2:47
857 "_BSD_SOURCE || _SVID_SOURCE\n"
858 " /* _GNU_SOURCE also suffices */\n"
860 "_BSD_SOURCE || _SVID_SOURCE\n"
861 " /* _GNU_SOURCE も定義される */\n"
864 #: build/C/man2/clone.2:90
865 msgid "B<clone>() creates a new process, in a manner similar to B<fork>(2)."
866 msgstr "B<clone>() は、 B<fork>(2) と似た方法で新しいプロセスを作成する。"
869 #: build/C/man2/clone.2:97
871 "This page describes both the glibc B<clone>() wrapper function and the "
872 "underlying system call on which it is based. The main text describes the "
873 "wrapper function; the differences for the raw system call are described "
874 "toward the end of this page."
876 "このページでは、 glibc の B<clone>() ラッパー関数とその裏で呼ばれるシステム"
877 "コールの両方について説明している。 メインの説明はラッパー関数に関するものであ"
878 "る。 素のシステムコールにおける差分はこのページの最後の方で説明する。"
881 #: build/C/man2/clone.2:109
883 "Unlike B<fork>(2), B<clone>() allows the child process to share parts of "
884 "its execution context with the calling process, such as the memory space, "
885 "the table of file descriptors, and the table of signal handlers. (Note that "
886 "on this manual page, \"calling process\" normally corresponds to \"parent "
887 "process\". But see the description of B<CLONE_PARENT> below.)"
889 "B<fork>(2) とは異なり、B<clone>() では、子プロセス (child process) と呼び出"
890 "し元のプロセスとが、メモリ空間、ファイルディスクリプタのテーブル、シグナル・"
891 "ハンドラのテーブルなどの 実行コンテキストの一部を共有できる。 (このマニュアル"
892 "における「呼び出し元のプロセス」は、通常は 「親プロセス」と一致する。但し、後"
893 "述の B<CLONE_PARENT> の項も参照のこと)"
896 #: build/C/man2/clone.2:114
898 "The main use of B<clone>() is to implement threads: multiple threads of "
899 "control in a program that run concurrently in a shared memory space."
901 "B<clone>() の主要な使用法はスレッド (threads) を実装することである: 一つのプ"
902 "ログラムの中の複数のスレッドは共有されたメモリ空間で 同時に実行される。"
905 #: build/C/man2/clone.2:134
907 "When the child process is created with B<clone>(), it executes the function "
908 "I<fn>(I<arg>). (This differs from B<fork>(2), where execution continues in "
909 "the child from the point of the B<fork>(2) call.) The I<fn> argument is a "
910 "pointer to a function that is called by the child process at the beginning "
911 "of its execution. The I<arg> argument is passed to the I<fn> function."
913 "B<clone>() で子プロセスが作成された時に、作成された子プロセスは関数 I<fn>"
914 "(I<arg>) を実行する。 (この点が B<fork>(2) とは異なる。 B<fork>(2) の場"
915 "合、子プロセスは B<fork>(2) が呼び出された場所から実行を続ける。) I<fn> 引"
916 "き数は、子プロセスが実行を始める時に子プロセスが呼び出す 関数へのポインタであ"
917 "る。 I<arg> 引き数はそのまま I<fn> 関数へと渡される。"
920 #: build/C/man2/clone.2:144
922 "When the I<fn>(I<arg>) function application returns, the child process "
923 "terminates. The integer returned by I<fn> is the exit code for the child "
924 "process. The child process may also terminate explicitly by calling B<exit>"
925 "(2) or after receiving a fatal signal."
927 "I<fn>(I<arg>) 関数が終了すると、子プロセスは終了する。 I<fn> によって返され"
928 "た整数が子プロセスの終了コードとなる。 子プロセスは、 B<exit>(2) を呼んで明"
929 "示的に終了することもあるし、致命的なシグナルを受信した 場合に終了することもあ"
933 #: build/C/man2/clone.2:160
935 "The I<child_stack> argument specifies the location of the stack used by the "
936 "child process. Since the child and calling process may share memory, it is "
937 "not possible for the child process to execute in the same stack as the "
938 "calling process. The calling process must therefore set up memory space for "
939 "the child stack and pass a pointer to this space to B<clone>(). Stacks grow "
940 "downward on all processors that run Linux (except the HP PA processors), so "
941 "I<child_stack> usually points to the topmost address of the memory space set "
942 "up for the child stack."
944 "I<child_stack> 引き数は、子プロセスによって使用されるスタックの位置を指定す"
945 "る。 子プロセスと呼び出し元のプロセスはメモリを共有することがあるため、 子プ"
946 "ロセスは呼び出し元のプロセスと同じスタックで実行することができない。 このた"
947 "め、呼び出し元のプロセスは子プロセスのスタックのためのメモリ空間を 用意して、"
948 "この空間へのポインタを B<clone>() へ渡さなければならない。 (HP PA プロセッサ"
949 "以外の) Linux が動作する全てのプロセッサでは、 スタックは下方 (アドレスが小さ"
950 "い方向) へと伸びる。このため、普通は I<child_stack> は子プロセスのスタックの"
951 "ために用意したメモリ空間の一番大きい アドレスを指すようにする。"
954 #: build/C/man2/clone.2:176
956 "The low byte of I<flags> contains the number of the I<termination signal> "
957 "sent to the parent when the child dies. If this signal is specified as "
958 "anything other than B<SIGCHLD>, then the parent process must specify the "
959 "B<__WALL> or B<__WCLONE> options when waiting for the child with B<wait>"
960 "(2). If no signal is specified, then the parent process is not signaled "
961 "when the child terminates."
963 "I<flags> の下位 1 バイトは子プロセスが死んだ場合に親プロセスへと送られる I<終"
964 "了シグナル (termination signal)> の番号を指定する。このシグナルとして "
965 "B<SIGCHLD> 以外が指定された場合、親プロセスは、 B<wait>(2) で子プロセスを待"
966 "つ際に、オプションとして B<__WALL> または B<__WCLONE> を指定しなければならな"
967 "い。 どのシグナルも指定されなかった場合、子プロセスが終了した時に親プロセス "
971 #: build/C/man2/clone.2:181
973 "I<flags> may also be bitwise-or'ed with zero or more of the following "
974 "constants, in order to specify what is shared between the calling process "
975 "and the child process:"
977 "I<flags> には、以下の定数のうち 0個以上をビット毎の論理和 (bitwise-or) を"
978 "とったものを指定できる。これらの定数は呼び出し元のプロセスと 子プロセスの間で"
982 #: build/C/man2/clone.2:181
984 msgid "B<CLONE_CHILD_CLEARTID> (since Linux 2.5.49)"
985 msgstr "B<CLONE_CHILD_CLEARTID> (Linux 2.5.49 以降)"
988 #: build/C/man2/clone.2:191
990 "Erase child thread ID at location I<ctid> in child memory when the child "
991 "exits, and do a wakeup on the futex at that address. The address involved "
992 "may be changed by the B<set_tid_address>(2) system call. This is used by "
993 "threading libraries."
995 "子プロセスが終了したときに子プロセスのメモリ内の I<ctid> が指す場所にある子プ"
996 "ロセスのスレッド ID を消去し、 そのアドレスで futex を wake (起床) させる。 "
997 "このアドレスは B<set_tid_address>(2) システムコールで変更することができる。 "
998 "この機能はスレッドライブラリで使用される。"
1001 #: build/C/man2/clone.2:191
1003 msgid "B<CLONE_CHILD_SETTID> (since Linux 2.5.49)"
1004 msgstr "B<CLONE_CHILD_SETTID> (Linux 2.5.49 以降)"
1007 #: build/C/man2/clone.2:196
1008 msgid "Store child thread ID at location I<ctid> in child memory."
1010 "子プロセスのメモリ内の I<ctid> が指す場所に子プロセスのスレッド ID を格納す"
1014 #: build/C/man2/clone.2:196
1016 msgid "B<CLONE_FILES> (since Linux 2.0)"
1017 msgstr "B<CLONE_FILES> (Linux 2.0 以降)"
1020 #: build/C/man2/clone.2:209
1022 "If B<CLONE_FILES> is set, the calling process and the child process share "
1023 "the same file descriptor table. Any file descriptor created by the calling "
1024 "process or by the child process is also valid in the other process. "
1025 "Similarly, if one of the processes closes a file descriptor, or changes its "
1026 "associated flags (using the B<fcntl>(2) B<F_SETFD> operation), the other "
1027 "process is also affected."
1029 "B<CLONE_FILES> が設定された場合、呼び出し元のプロセスと子プロセスはファイル"
1030 "ディスクリプタの テーブルを共有する。 呼び出し元プロセスとその子プロセスの一"
1031 "方が作成した ファイルディスクリプタは、もう一方においても有効である。 同じよ"
1032 "うに、一方のプロセスがファイルディスクリプタを閉じたり、 (B<fcntl>(2) "
1033 "B<F_SETFD> 操作を使って) ディスクリプタに関連するフラグを変更したりすると、 "
1037 #: build/C/man2/clone.2:223
1039 "If B<CLONE_FILES> is not set, the child process inherits a copy of all file "
1040 "descriptors opened in the calling process at the time of B<clone>(). (The "
1041 "duplicated file descriptors in the child refer to the same open file "
1042 "descriptions (see B<open>(2)) as the corresponding file descriptors in the "
1043 "calling process.) Subsequent operations that open or close file "
1044 "descriptors, or change file descriptor flags, performed by either the "
1045 "calling process or the child process do not affect the other process."
1047 "B<CLONE_FILES> が設定されていない場合、子プロセスは、 B<clone>() が実行され"
1048 "た時点で、呼び出し元のプロセスがオープンしている全ての ファイルディスクリプタ"
1049 "のコピーを継承する (子プロセスの複製されたファイルディスクリプタは、 対応する"
1050 "呼び出し元のプロセスのファイルディスクリプタと 同じファイル記述 (B<open>(2) "
1051 "参照) を参照する)。 これ以降に、呼び出し元のプロセスと子プロセスの一方が ファ"
1052 "イルディスクリプタの操作 (ファイルディスクリプタの オープン・クローズや、ファ"
1053 "イルディスクリプタ・フラグの変更) を行っても、もう一方のプロセスには影響を与"
1057 #: build/C/man2/clone.2:223
1059 msgid "B<CLONE_FS> (since Linux 2.0)"
1060 msgstr "B<CLONE_FS> (Linux 2.0 以降)"
1063 #: build/C/man2/clone.2:238
1065 "If B<CLONE_FS> is set, the caller and the child process share the same file "
1066 "system information. This includes the root of the file system, the current "
1067 "working directory, and the umask. Any call to B<chroot>(2), B<chdir>(2), or "
1068 "B<umask>(2) performed by the calling process or the child process also "
1069 "affects the other process."
1071 "B<CLONE_FS> が設定された場合、呼び出し元のプロセスと子プロセスが同じファイ"
1072 "ル・システム 情報を共有する。ファイル・システム情報は、ファイル・システムの"
1073 "ルート (root)、 カレント・ワーキング・ディレクトリ (current working "
1074 "directory) や umask などである。 呼び出し元のプロセスや子プロセスのどちらか"
1075 "一方によって B<chroot>(2), B<chdir>(2), B<umask>(2) が呼び出されると、もう一"
1079 #: build/C/man2/clone.2:250
1081 "If B<CLONE_FS> is not set, the child process works on a copy of the file "
1082 "system information of the calling process at the time of the B<clone>() "
1083 "call. Calls to B<chroot>(2), B<chdir>(2), B<umask>(2) performed later by "
1084 "one of the processes do not affect the other process."
1086 "B<CLONE_FS> が設定されていない場合、子プロセスは、 B<clone>() が実行された時"
1087 "点での、呼び出し元のプロセスのファイル・システム情報のコピーを 使用する。 こ"
1088 "れ以降は、呼び出し元のプロセスと子プロセスの一方が B<chroot>(2), B<chdir>"
1089 "(2), B<umask>(2) を呼び出しても、もう一方のプロセスには影響を与えない。"
1092 #: build/C/man2/clone.2:250
1094 msgid "B<CLONE_IO> (since Linux 2.6.25)"
1095 msgstr "B<CLONE_IO> (Linux 2.6.25 以降)"
1098 #: build/C/man2/clone.2:259
1100 "If B<CLONE_IO> is set, then the new process shares an I/O context with the "
1101 "calling process. If this flag is not set, then (as with B<fork>(2)) the "
1102 "new process has its own I/O context."
1104 "B<CLONE_IO> が設定された場合、新しいプロセスは呼び出し元のプロセスと I/O コン"
1105 "テキストを共有する。 このフラグが設定されていない場合には、 (B<fork>(2) の場"
1106 "合と同様) 新しいプロセスは自分専用の I/O コンテキストを持つ。"
1108 #. The following based on text from Jens Axboe
1109 #. the anticipatory and CFQ scheduler
1112 #: build/C/man2/clone.2:276
1114 "The I/O context is the I/O scope of the disk scheduler (i.e, what the I/O "
1115 "scheduler uses to model scheduling of a process's I/O). If processes share "
1116 "the same I/O context, they are treated as one by the I/O scheduler. As a "
1117 "consequence, they get to share disk time. For some I/O schedulers, if two "
1118 "processes share an I/O context, they will be allowed to interleave their "
1119 "disk access. If several threads are doing I/O on behalf of the same process "
1120 "(B<aio_read>(3), for instance), they should employ B<CLONE_IO> to get better "
1123 "I/O コンテキストは、ディスクスケジュールの I/O スコープである (言い換えると、"
1124 "I/O コンテキストは I/O スケジューラがプロセス I/O の スケジューリングをモデル"
1125 "化するのに使用される)。 複数のプロセスが同じ I/O コンテキストを共有する場"
1126 "合、 これらのプロセスは I/O スケジューラからは一つとして扱われる。 結果とし"
1127 "て、これらのプロセスはディスクアクセスの時間を共有するようになる。 いくつか"
1128 "の I/O スケジューラでは、 二つのプロセスが I/O コンテキストを共有している場"
1129 "合、 これらのプロセスはディスクアクセスを交互に行うことができる。 同じプロセ"
1130 "スの複数のスレッドが I/O を実行している場合 (例えば B<aio_read>(3))、 "
1131 "B<CLONE_IO> を利用することで I/O 性能を良くすることができる。"
1134 #: build/C/man2/clone.2:280
1136 "If the kernel is not configured with the B<CONFIG_BLOCK> option, this flag "
1139 "カーネルの設定が B<CONFIG_BLOCK> オプション付きでない場合、 このフラグは何の"
1143 #: build/C/man2/clone.2:280 build/C/man2/unshare.2:96
1145 msgid "B<CLONE_NEWIPC> (since Linux 2.6.19)"
1146 msgstr "B<CLONE_NEWIPC> (Linux 2.6.19 以降)"
1149 #: build/C/man2/clone.2:290
1151 "If B<CLONE_NEWIPC> is set, then create the process in a new IPC namespace. "
1152 "If this flag is not set, then (as with B<fork>(2)), the process is created "
1153 "in the same IPC namespace as the calling process. This flag is intended for "
1154 "the implementation of containers."
1156 "B<CLONE_NEWIPC> が設定された場合、新しい IPC 名前空間 (namespace) でプロセス"
1157 "を作成する。 このフラグが設定されていない場合、 (B<fork>(2) の場合と同様) 呼"
1158 "び出し元のプロセスと同じ IPC 名前空間でプロセスが 作成される。 このフラグは、"
1159 "コンテナの実装での使用を意図して用意されたものである。"
1161 #. commit 7eafd7c74c3f2e67c27621b987b28397110d643f
1162 #. https://lwn.net/Articles/312232/
1164 #: build/C/man2/clone.2:302
1166 "An IPC namespace provides an isolated view of System V IPC objects (see "
1167 "B<svipc>(7)) and (since Linux 2.6.30) POSIX message queues (see "
1168 "B<mq_overview>(7)). The common characteristic of these IPC mechanisms is "
1169 "that IPC objects are identified by mechanisms other than filesystem "
1172 "IPC 名前空間は、独立の System V IPC オブジェクト空間 (B<svipc>(7) 参照) を提"
1173 "供する 。 (Linux 2.6.30 以降では) 独立した POSIX メッセージキュー空間 "
1174 "(B<mq_overview>(7) 参照) も提供される。 これらの IPC 機構に共通の特徴とし"
1175 "て、 IPC オブジェクトはファイルシステムのパス名とは違った仕組みで識別されると"
1179 #: build/C/man2/clone.2:306
1181 "Objects created in an IPC namespace are visible to all other processes that "
1182 "are members of that namespace, but are not visible to processes in other IPC "
1185 "ある IPC 名前空間に作成されたオブジェクトは、 その名前空間のメンバーである他"
1186 "のすべてのプロセスからも見えるが、 違う IPC 名前空間のプロセスからは見えな"
1190 #: build/C/man2/clone.2:310
1192 "When an IPC namespace is destroyed (i.e., when the last process that is a "
1193 "member of the namespace terminates), all IPC objects in the namespace are "
1194 "automatically destroyed."
1196 "IPC 名前空間が破棄される時 (すなわち、その名前空間のメンバーの最後のプロセス"
1197 "が終了する時)、 その名前空間の全ての IPC オブジェクトは自動的に破棄される。"
1200 #: build/C/man2/clone.2:319
1202 "Use of this flag requires: a kernel configured with the B<CONFIG_SYSVIPC> "
1203 "and B<CONFIG_IPC_NS> options and that the process be privileged "
1204 "(B<CAP_SYS_ADMIN>). This flag can't be specified in conjunction with "
1207 "このフラグを使用するためには、 カーネルでオプション B<CONFIG_SYSVIPC> と "
1208 "B<CONFIG_IPC_NS> を有効になっていること、 プロセスが特権 (B<CAP_SYS_ADMIN>) "
1209 "を持っていることが必要である。 このフラグは B<CLONE_SYSVSEM> と組み合わせて使"
1213 #: build/C/man2/clone.2:319 build/C/man2/unshare.2:113
1215 msgid "B<CLONE_NEWNET> (since Linux 2.6.24)"
1216 msgstr "B<CLONE_NEWNET> (Linux 2.6.24 以降)"
1218 #. FIXME Check when the implementation was completed
1220 #: build/C/man2/clone.2:324
1222 "(The implementation of this flag was completed only by about kernel version "
1224 msgstr "(このフラグの実装は、Linux 2.6.29 あたりまでには完成した。)"
1227 #: build/C/man2/clone.2:333
1229 "If B<CLONE_NEWNET> is set, then create the process in a new network "
1230 "namespace. If this flag is not set, then (as with B<fork>(2)), the process "
1231 "is created in the same network namespace as the calling process. This flag "
1232 "is intended for the implementation of containers."
1234 "B<CLONE_NEWNET> が設定された場合、新しいネットワーク名前空間 (network "
1235 "namaspace) でプロセスを作成する。 このフラグが設定されていない場合、 "
1236 "(B<fork>(2) の場合と同様) 呼び出し元のプロセスと同じネットワーク名前空間でプ"
1237 "ロセスが 作成される。 このフラグは、コンテナの実装での使用を意図して用意され"
1240 #. FIXME Add pointer to veth(4) page when it is eventually completed
1242 #: build/C/man2/clone.2:348
1244 "A network namespace provides an isolated view of the networking stack "
1245 "(network device interfaces, IPv4 and IPv6 protocol stacks, IP routing "
1246 "tables, firewall rules, the I</proc/net> and I</sys/class/net> directory "
1247 "trees, sockets, etc.). A physical network device can live in exactly one "
1248 "network namespace. A virtual network device (\"veth\") pair provides a pipe-"
1249 "like abstraction that can be used to create tunnels between network "
1250 "namespaces, and can be used to create a bridge to a physical network device "
1251 "in another namespace."
1253 "ネットワーク名前空間は、分離されたネットワークスタックを提供するものである "
1254 "(ネットワークスタックとは、 ネットワークデバイスインタフェース、IPv4 や IPv6 "
1255 "プロトコルスタック、 I</proc/net>、 I</sys/class/net> ディレクトリツリー、ソ"
1256 "ケットなどである)。 物理ネットワークデバイスが所属できるネットワーク名前空間"
1257 "は一つだけである。 仮想ネットワークデバイス (\"veth\") のペアにより パイプ風"
1258 "の抽象化 (abstraction) が実現されており、 これを使うことで、ネットワーク名前"
1259 "空間間のトンネルを作成したり、 別の名前空間の物理ネットワークデバイスへのブ"
1260 "リッジを作成したり することができる。"
1263 #: build/C/man2/clone.2:353
1265 "When a network namespace is freed (i.e., when the last process in the "
1266 "namespace terminates), its physical network devices are moved back to the "
1267 "initial network namespace (not to the parent of the process)."
1269 "ネットワーク名前空間が解放される時 (すなわち、その名前空間の最後のプロセスが"
1270 "終了する時)、 物理ネットワークデバイスは初期ネットワーク名前空間 (initial "
1271 "network namespace) に戻される (親プロセスのネットワーク名前空間に戻される訳で"
1275 #: build/C/man2/clone.2:358
1277 "Use of this flag requires: a kernel configured with the B<CONFIG_NET_NS> "
1278 "option and that the process be privileged (B<CAP_SYS_ADMIN>)."
1280 "このフラグを使用するためには、 カーネルでオプション B<CONFIG_NET_NS> を有効に"
1281 "なっていること、 プロセスが特権 (B<CAP_SYS_ADMIN>) を持っていることが必要で"
1285 #: build/C/man2/clone.2:358
1287 msgid "B<CLONE_NEWNS> (since Linux 2.4.19)"
1288 msgstr "B<CLONE_NEWNS> (Linux 2.4.19 以降)"
1291 #: build/C/man2/clone.2:361
1292 msgid "Start the child in a new mount namespace."
1293 msgstr "子プロセスを新しいマウント名前空間 (mount namespace) で開始する。"
1296 #: build/C/man2/clone.2:382
1298 "Every process lives in a mount namespace. The I<namespace> of a process is "
1299 "the data (the set of mounts) describing the file hierarchy as seen by that "
1300 "process. After a B<fork>(2) or B<clone>() where the B<CLONE_NEWNS> flag "
1301 "is not set, the child lives in the same mount namespace as the parent. The "
1302 "system calls B<mount>(2) and B<umount>(2) change the mount namespace of "
1303 "the calling process, and hence affect all processes that live in the same "
1304 "namespace, but do not affect processes in a different mount namespace."
1306 "各プロセスはある一つのマウント名前空間中に存在する。プロセスの I<名前空間 "
1307 "(namespace)> は、そのプロセスから見えるファイル階層を表すデータ (mount の集"
1308 "合) である。 B<CLONE_NEWNS> フラグがセットされずに B<fork>(2) か B<clone>"
1309 "() が呼ばれると、子プロセスは親プロセスと同じマウント名前空間に作成される。 "
1310 "システムコール B<mount>(2)、 B<umount>(2) が呼ばれると呼び出し元のプロセスの"
1311 "マウント名前空間が変更され、この結果 呼び出し元のプロセスと同じ名前空間にいる"
1312 "プロセスはすべて影響を受けるが、 異なるマウント名前空間にいるプロセスは影響を"
1316 #: build/C/man2/clone.2:389
1318 "After a B<clone>() where the B<CLONE_NEWNS> flag is set, the cloned child "
1319 "is started in a new mount namespace, initialized with a copy of the "
1320 "namespace of the parent."
1322 "B<CLONE_NEWNS> フラグがセットされて B<clone>() が呼ばれると、clone で作成さ"
1323 "れた子プロセスは新しいマウント名前空間で 開始される。新しい名前空間は親プロセ"
1324 "スの名前空間のコピーで初期化される。"
1327 #: build/C/man2/clone.2:401
1329 "Only a privileged process (one having the B<CAP_SYS_ADMIN> capability) may "
1330 "specify the B<CLONE_NEWNS> flag. It is not permitted to specify both "
1331 "B<CLONE_NEWNS> and B<CLONE_FS> in the same B<clone>() call."
1333 "特権プロセス (B<CAP_SYS_ADMIN> ケーパビリティを持つプロセス) のみが "
1334 "B<CLONE_NEWNS> フラグを指定することができる。 一つの B<clone>() 呼び出し"
1335 "で、 B<CLONE_NEWNS> と B<CLONE_FS> の両方を指定することはできない。"
1338 #: build/C/man2/clone.2:401
1340 msgid "B<CLONE_NEWPID> (since Linux 2.6.24)"
1341 msgstr "B<CLONE_NEWPID> (Linux 2.6.24 以降)"
1343 #. This explanation draws a lot of details from
1344 #. http://lwn.net/Articles/259217/
1345 #. Authors: Pavel Emelyanov <xemul@openvz.org>
1346 #. and Kir Kolyshkin <kir@openvz.org>
1347 #. The primary kernel commit is 30e49c263e36341b60b735cbef5ca37912549264
1348 #. Author: Pavel Emelyanov <xemul@openvz.org>
1350 #: build/C/man2/clone.2:418
1352 "If B<CLONE_NEWPID> is set, then create the process in a new PID namespace. "
1353 "If this flag is not set, then (as with B<fork>(2)), the process is created "
1354 "in the same PID namespace as the calling process. This flag is intended for "
1355 "the implementation of containers."
1357 "B<CLONE_NEWPID> が設定された場合、新しい PID 名前空間でプロセスを作成する。 "
1358 "このフラグが設定されていない場合、 (B<fork>(2) の場合と同様) 呼び出し元のプ"
1359 "ロセスと同じ PID 名前空間で プロセスが作成される。 このフラグは、コンテナの実"
1360 "装での使用を意図して用意されたものである。"
1363 #: build/C/man2/clone.2:427
1365 "A PID namespace provides an isolated environment for PIDs: PIDs in a new "
1366 "namespace start at 1, somewhat like a standalone system, and calls to B<fork>"
1367 "(2), B<vfork>(2), or B<clone>() will produce processes with PIDs that are "
1368 "unique within the namespace."
1370 "PID 名前空間は、PID に関して分離された環境を提供するものである。 新しい名前空"
1371 "間における PID は 1 から始まり (これはスタンドアロンのシステムと似たような感"
1372 "じ)、 B<fork>(2), B<vfork>(2), B<clone>() を呼び出すと、その名前空間で一意"
1373 "な PID を持ったプロセスが作成される。"
1376 #: build/C/man2/clone.2:439
1378 "The first process created in a new namespace (i.e., the process created "
1379 "using the B<CLONE_NEWPID> flag) has the PID 1, and is the \"init\" process "
1380 "for the namespace. Children that are orphaned within the namespace will be "
1381 "reparented to this process rather than B<init>(8). Unlike the traditional "
1382 "B<init> process, the \"init\" process of a PID namespace can terminate, and "
1383 "if it does, all of the processes in the namespace are terminated."
1385 "新しい名前空間で作成される最初のプロセス (つまり、 B<CLONE_NEWPID> フラグを"
1386 "使って作成されたプロセス) の PID は 1 であり、 このプロセスはその名前空間にお"
1387 "ける \"init\" プロセスとなる。 この名前空間において孤児 (orphaned) となった子"
1388 "プロセスについては、 B<init>(8) ではなくこのプロセスが親プロセスとなる。 昔"
1389 "ながらの B<init> プロセスとは違い、PID 名前空間の \"init\" プロセスは終了 "
1390 "(terminated) する ことができ、その場合には、この名前空間の全てのプロセスが終"
1394 #: build/C/man2/clone.2:458
1396 "PID namespaces form a hierarchy. When a new PID namespace is created, the "
1397 "processes in that namespace are visible in the PID namespace of the process "
1398 "that created the new namespace; analogously, if the parent PID namespace is "
1399 "itself the child of another PID namespace, then processes in the child and "
1400 "parent PID namespaces will both be visible in the grandparent PID "
1401 "namespace. Conversely, the processes in the \"child\" PID namespace do not "
1402 "see the processes in the parent namespace. The existence of a namespace "
1403 "hierarchy means that each process may now have multiple PIDs: one for each "
1404 "namespace in which it is visible; each of these PIDs is unique within the "
1405 "corresponding namespace. (A call to B<getpid>(2) always returns the PID "
1406 "associated with the namespace in which the process lives.)"
1408 "PID 名前空間間には階層構造が形成される。 新しい PID 名前空間が作成されると、"
1409 "その名前空間のプロセスは、 新しい名前空間を作成したプロセスの PID 名前空間で"
1410 "見える。 同様に、親の PID 名前空間自体が別の PID 名前空間の子供の場合には、 "
1411 "子供の PID 名前空間と親の PID 名前空間のプロセスはどれも 親の親の PID 名前空"
1412 "間でも見えることになる。 反対に、「子供」の PID 名前空間のプロセスには、 親の"
1413 "名前空間のプロセスは見えない。 名前空間に階層構造が存在するということは、個々"
1414 "のプロセスは 複数の PID を持つということを意味している。 そのプロセスが見える"
1415 "名前空間一つにつき PID が一つあり、 それぞれの PID は対応する名前空間において"
1416 "一意である。 (B<getpid>(2) を呼び出すと、常にそのプロセスが存在している名前"
1417 "空間における PID が返される。)"
1419 #. mount -t proc proc /proc
1421 #: build/C/man2/clone.2:474
1423 "After creating the new namespace, it is useful for the child to change its "
1424 "root directory and mount a new procfs instance at I</proc> so that tools "
1425 "such as B<ps>(1) work correctly. (If B<CLONE_NEWNS> is also included in "
1426 "I<flags>, then it isn't necessary to change the root directory: a new procfs "
1427 "instance can be mounted directly over I</proc>.)"
1429 "新しい名前空間の作成後には、 子プロセスにおいて、 B<ps>(1) といったツールが"
1430 "正しく動作するように、 自身の root ディレクトリを変更し、 I</proc> に新しい "
1431 "procfs インスタンスをマウントするのがよいだろう。 (B<flags> に "
1432 "B<CLONE_NEWNS> も指定されていた場合には、root ディレクトリを変更する必要はな"
1433 "く、 いきなり新しい procfs インスタンスを I</proc> にマウントすることができ"
1437 #: build/C/man2/clone.2:481
1439 "Use of this flag requires: a kernel configured with the B<CONFIG_PID_NS> "
1440 "option and that the process be privileged (B<CAP_SYS_ADMIN>). This flag "
1441 "can't be specified in conjunction with B<CLONE_THREAD>."
1443 "このフラグを使用するためには、 カーネルでオプション B<CONFIG_PID_NS> を有効に"
1444 "なっていること、 プロセスが特権 (B<CAP_SYS_ADMIN>) を持っていることが必要で"
1445 "ある。 このフラグは B<CLONE_THREAD> と組み合わせて使うことはできない。"
1448 #: build/C/man2/clone.2:481 build/C/man2/unshare.2:149
1450 msgid "B<CLONE_NEWUTS> (since Linux 2.6.19)"
1451 msgstr "B<CLONE_NEWUTS> (Linux 2.6.19 以降)"
1454 #: build/C/man2/clone.2:493
1456 "If B<CLONE_NEWUTS> is set, then create the process in a new UTS namespace, "
1457 "whose identifiers are initialized by duplicating the identifiers from the "
1458 "UTS namespace of the calling process. If this flag is not set, then (as "
1459 "with B<fork>(2)), the process is created in the same UTS namespace as the "
1460 "calling process. This flag is intended for the implementation of containers."
1462 "B<CLONE_NEWUTS> が設定された場合、新しい UTS 名前空間でプロセスを作成する。 "
1463 "新しい UTS 名前空間の識別子の初期値は、呼び出し元のプロセスの UTS 名前空間の"
1464 "識別子を複製したものとなる。 このフラグが設定されていない場合、 (B<fork>(2) "
1465 "の場合と同様) 呼び出し元のプロセスと同じ UTS 名前空間で プロセスが作成され"
1466 "る。 このフラグは、コンテナの実装での使用を意図して用意されたものである。"
1469 #: build/C/man2/clone.2:505
1471 "A UTS namespace is the set of identifiers returned by B<uname>(2); among "
1472 "these, the domain name and the host name can be modified by B<setdomainname>"
1473 "(2) and B<sethostname>(2), respectively. Changes made to the identifiers "
1474 "in a UTS namespace are visible to all other processes in the same namespace, "
1475 "but are not visible to processes in other UTS namespaces."
1477 "UTS 名前空間は、 B<uname>(2) が返す識別子の集合である。 識別子としてはドメイ"
1478 "ン名とホスト名があり、 それぞれ B<setdomainname>(2), B<sethostname>(2) で修"
1479 "正することができる。 ある UTS 名前空間における識別子の変更は同じ名前空間の他"
1480 "のすべての プロセスに見えるが、別の UTS 名前空間のプロセスには見えない。"
1483 #: build/C/man2/clone.2:510
1485 "Use of this flag requires: a kernel configured with the B<CONFIG_UTS_NS> "
1486 "option and that the process be privileged (B<CAP_SYS_ADMIN>)."
1488 "このフラグを使用するためには、 カーネルでオプション B<CONFIG_UTS_NS> を有効に"
1489 "なっていること、 プロセスが特権 (B<CAP_SYS_ADMIN>) を持っていることが必要で"
1493 #: build/C/man2/clone.2:510
1495 msgid "B<CLONE_PARENT> (since Linux 2.3.12)"
1496 msgstr "B<CLONE_PARENT> (Linux 2.3.12 以降)"
1499 #: build/C/man2/clone.2:517
1501 "If B<CLONE_PARENT> is set, then the parent of the new child (as returned by "
1502 "B<getppid>(2)) will be the same as that of the calling process."
1504 "B<CLONE_PARENT> が設定された場合、新しい子供の (B<getppid>(2) で返される) 親"
1505 "プロセスは呼び出し元のプロセスの親プロセスと同じになる。"
1508 #: build/C/man2/clone.2:523
1510 "If B<CLONE_PARENT> is not set, then (as with B<fork>(2)) the child's parent "
1511 "is the calling process."
1513 "B<CLONE_PARENT> が設定されていない場合、 (B<fork>(2) と同様に) 呼び出し元の"
1517 #: build/C/man2/clone.2:531
1519 "Note that it is the parent process, as returned by B<getppid>(2), which is "
1520 "signaled when the child terminates, so that if B<CLONE_PARENT> is set, then "
1521 "the parent of the calling process, rather than the calling process itself, "
1524 "子供が終了した時にシグナルが送られるのは B<getppid>(2) が返す親プロセスであ"
1525 "る点に注意すること。このため B<CLONE_PARENT> が設定された場合、呼び出し元のプ"
1526 "ロセスではなく呼び出し元のプロセスの 親プロセスにシグナルが送られる。"
1529 #: build/C/man2/clone.2:531
1531 msgid "B<CLONE_PARENT_SETTID> (since Linux 2.5.49)"
1532 msgstr "B<CLONE_PARENT_SETTID> (Linux 2.5.49 以降)"
1535 #: build/C/man2/clone.2:539
1537 "Store child thread ID at location I<ptid> in parent and child memory. (In "
1538 "Linux 2.5.32-2.5.48 there was a flag B<CLONE_SETTID> that did this.)"
1540 "親プロセスと子プロセスのメモリ内の I<ptid> が指す領域に子プロセスのスレッド "
1541 "ID を格納する。 (Linux 2.5.32-2.5.48 では、 同じことをする B<CLONE_SETTID> と"
1545 #: build/C/man2/clone.2:539
1547 msgid "B<CLONE_PID> (obsolete)"
1548 msgstr "B<CLONE_PID> (廃止予定)"
1551 #: build/C/man2/clone.2:550
1553 "If B<CLONE_PID> is set, the child process is created with the same process "
1554 "ID as the calling process. This is good for hacking the system, but "
1555 "otherwise of not much use. Since 2.3.21 this flag can be specified only by "
1556 "the system boot process (PID 0). It disappeared in Linux 2.5.16."
1558 "B<CLONE_PID> が設定された場合、子プロセスは呼び出し元のプロセスと同じプロセ"
1559 "ス ID で作成される。これはシステムをハッキングするのには便利だが、 それ以外に"
1560 "はあまり使われない。 Linux 2.3.21 以降では、 システムのブートプロセス (PID "
1561 "0) だけがこのフラグを指定できる。 Linux 2.5.16 で削除された。"
1564 #: build/C/man2/clone.2:550
1566 msgid "B<CLONE_PTRACE> (since Linux 2.2)"
1567 msgstr "B<CLONE_PTRACE> (Linux 2.2 以降)"
1570 #: build/C/man2/clone.2:557
1572 "If B<CLONE_PTRACE> is specified, and the calling process is being traced, "
1573 "then trace the child also (see B<ptrace>(2))."
1575 "B<CLONE_PTRACE> が指定され、かつ呼び出し元のプロセスが追跡 (trace) されていた"
1576 "場合、子プロセスも 同様に追跡される。 (B<ptrace>(2) を参照のこと)"
1579 #: build/C/man2/clone.2:557
1581 msgid "B<CLONE_SETTLS> (since Linux 2.5.32)"
1582 msgstr "B<CLONE_SETTLS> (Linux 2.5.32 以降)"
1585 #: build/C/man2/clone.2:564
1587 "The I<newtls> argument is the new TLS (Thread Local Storage) descriptor. "
1588 "(See B<set_thread_area>(2).)"
1590 "I<newtls> 引き数は、新しい TLS (Thread Local Storage) ディスクリプタである。 "
1591 "(B<set_thread_area>(2) を参照のこと)"
1594 #: build/C/man2/clone.2:564
1596 msgid "B<CLONE_SIGHAND> (since Linux 2.0)"
1597 msgstr "B<CLONE_SIGHAND> (Linux 2.0 以降)"
1600 #: build/C/man2/clone.2:580
1602 "If B<CLONE_SIGHAND> is set, the calling process and the child process share "
1603 "the same table of signal handlers. If the calling process or child process "
1604 "calls B<sigaction>(2) to change the behavior associated with a signal, the "
1605 "behavior is changed in the other process as well. However, the calling "
1606 "process and child processes still have distinct signal masks and sets of "
1607 "pending signals. So, one of them may block or unblock some signals using "
1608 "B<sigprocmask>(2) without affecting the other process."
1610 "B<CLONE_SIGHAND> が設定された場合、呼び出し元のプロセスと子プロセスは同じシグ"
1611 "ナル・ハン ドラのテーブルを共有する。呼び出し元のプロセスまたは子プロセスのど"
1612 "ちらかが B<sigaction>(2) を呼び出してシグナルに対応する動作を変更した場合、 "
1613 "もう一方のプロセスのシグナル動作も変更される。 但し、呼び出し元のプロセスと子"
1614 "プロセスは、 プロセス毎に、シグナル・マスク (signal mask) と処理待ちシグナル"
1615 "の集合 を持っている。このため、あるプロセスは、 B<sigprocmask>(2) を使用し"
1616 "て、もう一方のプロセスに影響を与えずに シグナルを禁止 (block) したり許可 "
1620 #: build/C/man2/clone.2:591
1622 "If B<CLONE_SIGHAND> is not set, the child process inherits a copy of the "
1623 "signal handlers of the calling process at the time B<clone>() is called. "
1624 "Calls to B<sigaction>(2) performed later by one of the processes have no "
1625 "effect on the other process."
1627 "B<CLONE_SIGHAND> が設定されていない場合、子プロセスは B<clone>() が実行され"
1628 "た時点での、呼び出し元のプロセスのシグナル・ハンドラの コピーを継承する。これ"
1629 "以降は、一方のプロセスが B<sigaction>(2) を呼び出しても、もう一方のプロセス"
1633 #: build/C/man2/clone.2:599
1635 "Since Linux 2.6.0-test6, I<flags> must also include B<CLONE_VM> if "
1636 "B<CLONE_SIGHAND> is specified"
1638 "Linux 2.6.0-test6 以降では、 B<CLONE_SIGHAND> を指定する場合、 B<CLONE_VM> "
1639 "も I<flags> に含めなければならない。"
1642 #: build/C/man2/clone.2:599
1644 msgid "B<CLONE_STOPPED> (since Linux 2.6.0-test2)"
1645 msgstr "B<CLONE_STOPPED> (Linux 2.6.0-test2 以降)"
1648 #: build/C/man2/clone.2:608
1650 "If B<CLONE_STOPPED> is set, then the child is initially stopped (as though "
1651 "it was sent a B<SIGSTOP> signal), and must be resumed by sending it a "
1652 "B<SIGCONT> signal."
1654 "B<CLONE_STOPPED> が設定されると、子プロセスは最初 (B<SIGSTOP> シグナルを送ら"
1655 "れたかのように) 停止した状態となる。 子プロセスを再開させるには B<SIGCONT> シ"
1658 #. glibc 2.8 removed this defn from bits/sched.h
1660 #: build/C/man2/clone.2:616
1662 "This flag was I<deprecated> from Linux 2.6.25 onward, and was I<removed> "
1663 "altogether in Linux 2.6.38."
1665 "このフラグは Linux 2.6.25 以降ではI<非推奨>であり、\n"
1666 "Linux 2.6.38 で完全にI<削除>された。"
1669 #: build/C/man2/clone.2:616
1671 msgid "B<CLONE_SYSVSEM> (since Linux 2.5.10)"
1672 msgstr "B<CLONE_SYSVSEM> (Linux 2.5.10 以降)"
1675 #: build/C/man2/clone.2:625
1677 "If B<CLONE_SYSVSEM> is set, then the child and the calling process share a "
1678 "single list of System V semaphore undo values (see B<semop>(2)). If this "
1679 "flag is not set, then the child has a separate undo list, which is initially "
1682 "B<CLONE_SYSVSEM> がセットされると、子プロセスと呼び出し元プロセスは一つの "
1683 "System V セマフォのアンドゥ値リスト (B<semop>(2) 参照) を共有する。このフラ"
1684 "グがセットされていなければ、 子プロセスは独自のアンドゥリストを持つ (リストの"
1688 #: build/C/man2/clone.2:625
1690 msgid "B<CLONE_THREAD> (since Linux 2.4.0-test8)"
1691 msgstr "B<CLONE_THREAD> (Linux 2.4.0-test8以降)"
1694 #: build/C/man2/clone.2:634
1696 "If B<CLONE_THREAD> is set, the child is placed in the same thread group as "
1697 "the calling process. To make the remainder of the discussion of "
1698 "B<CLONE_THREAD> more readable, the term \"thread\" is used to refer to the "
1699 "processes within a thread group."
1701 "B<CLONE_THREAD> が設定された場合、子プロセスは呼び出し元のプロセスと同じス"
1702 "レッド・グループに 置かれる。 B<CLONE_THREAD> についての以降の議論を読みやす"
1703 "くするため、 「スレッド」という用語はスレッド・グループの中のプロセスを 参照"
1707 #: build/C/man2/clone.2:642
1709 "Thread groups were a feature added in Linux 2.4 to support the POSIX threads "
1710 "notion of a set of threads that share a single PID. Internally, this shared "
1711 "PID is the so-called thread group identifier (TGID) for the thread group. "
1712 "Since Linux 2.4, calls to B<getpid>(2) return the TGID of the caller."
1714 "スレッド・グループは、 スレッド集合で一つの PID を共有するという POSIX スレッ"
1715 "ドの概念をサポートするために Linux 2.4 に加えられた機能であった。 内部的に"
1716 "は、この共有 PID はいわゆるそのスレッドグループの スレッド・グループ識別子 "
1717 "(TGID) である。 Linux 2.4 以降では、 B<getpid>(2) の呼び出しではそのプロセス"
1718 "のスレッド・グループ ID を返す。"
1721 #: build/C/man2/clone.2:651
1723 "The threads within a group can be distinguished by their (system-wide) "
1724 "unique thread IDs (TID). A new thread's TID is available as the function "
1725 "result returned to the caller of B<clone>(), and a thread can obtain its own "
1726 "TID using B<gettid>(2)."
1728 "あるグループに属するスレッドは (システム全体で) 一意なスレッド ID (TID) で区"
1729 "別できる。新しいスレッドの TID は B<clone>() の呼び出し元へ関数の結果として"
1730 "返され、 スレッドは自分自身の TID を B<gettid>(2) で取得できる。"
1733 #: build/C/man2/clone.2:661
1735 "When a call is made to B<clone>() without specifying B<CLONE_THREAD>, then "
1736 "the resulting thread is placed in a new thread group whose TGID is the same "
1737 "as the thread's TID. This thread is the I<leader> of the new thread group."
1739 "B<CLONE_THREAD> を指定せずに B<clone>() の呼び出しが行われると、 生成された"
1740 "スレッドはそのスレッドの TID と同じ値の TGID を持つ 新しいスレッド・グループ"
1741 "に置かれる。このスレッドは 新しいスレッド・グループの「リーダー」である。"
1744 #: build/C/man2/clone.2:683
1746 "A new thread created with B<CLONE_THREAD> has the same parent process as the "
1747 "caller of B<clone>() (i.e., like B<CLONE_PARENT>), so that calls to "
1748 "B<getppid>(2) return the same value for all of the threads in a thread "
1749 "group. When a B<CLONE_THREAD> thread terminates, the thread that created it "
1750 "using B<clone>() is not sent a B<SIGCHLD> (or other termination) signal; "
1751 "nor can the status of such a thread be obtained using B<wait>(2). (The "
1752 "thread is said to be I<detached>.)"
1754 "B<CLONE_THREAD> を指定して作成された新しいスレッドは、 (B<CLONE_PARENT> の場"
1755 "合と同様に) B<clone>() を呼び出し元と同じ親プロセスを持つ。 そのため、 "
1756 "B<getppid>(2) を呼ぶと、一つのスレッド・グループに属すスレッドは全て同じ値を"
1757 "返す。 B<CLONE_THREAD> で作られたスレッドが終了した際に、 そのスレッドを "
1758 "B<clone>() を使って生成したスレッドには B<SIGCHLD> (もしくは他の終了シグナ"
1759 "ル) は送信されない。 また、 B<wait>(2) を使って終了したスレッドの状態を取得"
1760 "することもできない (そのようなスレッドは I<detached> (分離された) といわれ"
1764 #: build/C/man2/clone.2:688
1766 "After all of the threads in a thread group terminate the parent process of "
1767 "the thread group is sent a B<SIGCHLD> (or other termination) signal."
1769 "スレッド・グループに属す全てのスレッドが終了した後、 そのスレッド・グループの"
1770 "親プロセスに B<SIGCHLD> (もしくは他の終了シグナル) が送られる。"
1773 #: build/C/man2/clone.2:693
1775 "If any of the threads in a thread group performs an B<execve>(2), then all "
1776 "threads other than the thread group leader are terminated, and the new "
1777 "program is executed in the thread group leader."
1779 "スレッド・グループに属すいずれかのスレッドが B<execve>(2) を実行すると、ス"
1780 "レッド・グループ・リーダー以外の全てのスレッドは 終了され、新しいプロセスがそ"
1781 "のスレッド・グループ・リーダーの下で 実行される。"
1784 #: build/C/man2/clone.2:699
1786 "If one of the threads in a thread group creates a child using B<fork>(2), "
1787 "then any thread in the group can B<wait>(2) for that child."
1789 "スレッド・グループに属すスレッドの一つが B<fork>(2) を使って子プロセスを作成"
1790 "した場合、 スレッド・グループのどのスレッドであっても その子供を B<wait>(2) "
1794 #: build/C/man2/clone.2:707
1796 "Since Linux 2.5.35, I<flags> must also include B<CLONE_SIGHAND> if "
1797 "B<CLONE_THREAD> is specified."
1799 "Linux 2.5.35 以降では、 B<CLONE_THREAD> を指定する場合、 I<flags> に "
1800 "B<CLONE_SIGHAND> も含まれていなければならない。"
1803 #: build/C/man2/clone.2:712
1805 "Signals may be sent to a thread group as a whole (i.e., a TGID) using B<kill>"
1806 "(2), or to a specific thread (i.e., TID) using B<tgkill>(2)."
1808 "B<kill>(2) を使ってスレッド・グループ全体 (つまり TGID) にシグナルを送ること"
1809 "もできれば、 B<tgkill>(2) を使って特定のスレッド (つまり TID) にシグナルを送"
1813 #: build/C/man2/clone.2:717
1815 "Signal dispositions and actions are process-wide: if an unhandled signal is "
1816 "delivered to a thread, then it will affect (terminate, stop, continue, be "
1817 "ignored in) all members of the thread group."
1819 "シグナルの配送と処理はプロセス全体に影響する: ハンドラを設定していないシグナ"
1820 "ルがあるスレッドに配送されると、 そのシグナルはスレッド・グループの全メンバー"
1821 "に影響を及ぼす (終了したり、停止したり、動作を継続したり、無視されたりする)。"
1824 #: build/C/man2/clone.2:730
1826 "Each thread has its own signal mask, as set by B<sigprocmask>(2), but "
1827 "signals can be pending either: for the whole process (i.e., deliverable to "
1828 "any member of the thread group), when sent with B<kill>(2); or for an "
1829 "individual thread, when sent with B<tgkill>(2). A call to B<sigpending>(2) "
1830 "returns a signal set that is the union of the signals pending for the whole "
1831 "process and the signals that are pending for the calling thread."
1833 "各々のスレッドは独自のシグナルマスクを持っており、 B<sigprocmask>(2) で設定"
1834 "できる。 だが、処理待ちのシグナルには、 B<kill>(2) で送信されるプロセス全体"
1835 "に対するもの (つまり、スレッド・グループの どのメンバーにも配送できるもの) "
1836 "と、 B<tgkill>(2) で送信される個々のスレッドに対するものがありえる。 "
1837 "B<sigpending>(2) を呼び出すと、プロセス全体に対する処理待ちシグナルと呼び出"
1838 "し元の スレッドに対する処理待ちシグナルを結合したシグナル集合が返される。"
1841 #: build/C/man2/clone.2:742
1843 "If B<kill>(2) is used to send a signal to a thread group, and the thread "
1844 "group has installed a handler for the signal, then the handler will be "
1845 "invoked in exactly one, arbitrarily selected member of the thread group that "
1846 "has not blocked the signal. If multiple threads in a group are waiting to "
1847 "accept the same signal using B<sigwaitinfo>(2), the kernel will arbitrarily "
1848 "select one of these threads to receive a signal sent using B<kill>(2)."
1850 "B<kill>(2) を使ってスレッド・グループにシグナルが送られた場合で、 そのスレッ"
1851 "ド・グループがそのシグナルに対するシグナル・ハンドラが 登録されていたときに"
1852 "は、シグナル・ハンドラはスレッド・グループの メンバーのうち、ただ一つのスレッ"
1853 "ドでだけ起動される。ハンドラが 起動されるスレッドは、そのシグナルを禁止 "
1854 "(block) していない メンバーの中から一つだけが勝手に (arbitrarily) 選ばれる。 "
1855 "スレッド・グループに属す複数のスレッドが B<sigwaitinfo>(2) を使って同じシグ"
1856 "ナルを待っている場合、 これらのスレッドの中から一つをカーネルが勝手に選択"
1857 "し、 そのスレッドが B<kill (2)> を使って送信されたシグナルを受信する。"
1860 #: build/C/man2/clone.2:742
1862 msgid "B<CLONE_UNTRACED> (since Linux 2.5.46)"
1863 msgstr "B<CLONE_UNTRACED> (Linux 2.5.46 以降)"
1866 #: build/C/man2/clone.2:749
1868 "If B<CLONE_UNTRACED> is specified, then a tracing process cannot force "
1869 "B<CLONE_PTRACE> on this child process."
1871 "B<CLONE_UNTRACED> が指定されると、 trace を行っているプロセスは この子プロセ"
1872 "スに B<CLONE_PTRACE> を適用することができない。"
1875 #: build/C/man2/clone.2:749
1877 msgid "B<CLONE_VFORK> (since Linux 2.2)"
1878 msgstr "B<CLONE_VFORK> (Linux 2.2 以降)"
1881 #: build/C/man2/clone.2:761
1883 "If B<CLONE_VFORK> is set, the execution of the calling process is suspended "
1884 "until the child releases its virtual memory resources via a call to B<execve>"
1885 "(2) or B<_exit>(2) (as with B<vfork>(2))."
1887 "B<CLONE_VFORK> が設定された場合、 (B<vfork>(2) と同様に) 子プロセスが "
1888 "B<execve>(2) または B<_exit>(2) によって仮想メモリを解放するまで、呼び出し"
1892 #: build/C/man2/clone.2:767
1894 "If B<CLONE_VFORK> is not set then both the calling process and the child are "
1895 "schedulable after the call, and an application should not rely on execution "
1896 "occurring in any particular order."
1898 "B<CLONE_VFORK> が設定されていない場合、 B<clone>() 呼び出し後は、呼び出し元"
1899 "のプロセスと子プロセスの 両方がスケジュール対象となり、アプリケーションはこれ"
1900 "らのプロセスの 実行順序に依存しないようにすべきである。"
1903 #: build/C/man2/clone.2:767
1905 msgid "B<CLONE_VM> (since Linux 2.0)"
1906 msgstr "B<CLONE_VM> (Linux 2.0 以降)"
1909 #: build/C/man2/clone.2:780
1911 "If B<CLONE_VM> is set, the calling process and the child process run in the "
1912 "same memory space. In particular, memory writes performed by the calling "
1913 "process or by the child process are also visible in the other process. "
1914 "Moreover, any memory mapping or unmapping performed with B<mmap>(2) or "
1915 "B<munmap>(2) by the child or calling process also affects the other process."
1917 "B<CLONE_VM> が設定された場合、呼び出し元のプロセスと子プロセスは同じメモリ空"
1918 "間で 実行される。特に、呼び出し元のプロセスや子プロセスの一方がメモリに 書き"
1919 "込んだ内容はもう一方のプロセスからも見ることができる。さらに、 子プロセスや呼"
1920 "び出し元のプロセスの一方が B<mmap>(2) や B<munmap>(2) を使ってメモリをマッ"
1921 "プしたりアンマップした場合、 もう一方のプロセスにも影響が及ぶ。"
1924 #: build/C/man2/clone.2:789
1926 "If B<CLONE_VM> is not set, the child process runs in a separate copy of the "
1927 "memory space of the calling process at the time of B<clone>(). Memory "
1928 "writes or file mappings/unmappings performed by one of the processes do not "
1929 "affect the other, as with B<fork>(2)."
1931 "B<CLONE_VM> が設定されていない場合、子プロセスは B<clone>() が実行された時点"
1932 "での、親プロセスのメモリ空間をコピーした 別のメモリ空間で実行される。 一方の"
1933 "プロセスが行ったメモリへの書き込みや ファイルのマップ/アンマップは、 B<fork>"
1934 "(2) の場合と同様、もう一方のプロセスには影響しない。"
1937 #: build/C/man2/clone.2:789
1939 msgid "The raw system call interface"
1940 msgstr "素のシステムコールのインターフェース"
1943 #: build/C/man2/clone.2:805
1945 "The raw B<clone>() system call corresponds more closely to B<fork>(2) in "
1946 "that execution in the child continues from the point of the call. As such, "
1947 "the I<fn> and I<arg> arguments of the B<clone>() wrapper function are "
1948 "omitted. Furthermore, the argument order changes. The raw system call "
1949 "interface on x86 and many other architectures is roughly:"
1951 "素の B<clone> システムコールは、より B<fork>(2) に近いかたちになっており、 子"
1952 "プロセスの実行が呼び出しが行われた場所から続けられる。 そのため、 B<clone>() "
1953 "ラッパー関数の引き数 I<fn> と I<arg> は省略される。 また、 引き数の順序も違っ"
1954 "ている。 x86 と他の多くのアーキテクチャにおける、 素のシステムコールのイン"
1955 "ターフェースは、 おおまかには次のようになっている。"
1958 #: build/C/man2/clone.2:811
1961 "B<long clone(unsigned long >I<flags>B<, void *>I<child_stack>B<,>\n"
1962 "B< void *>I<ptid>B<, void *>I<ctid>B<,>\n"
1963 "B< struct pt_regs *>I<regs>B<);>\n"
1965 "B<long clone(unsigned long >I<flags>B<, void *>I<child_stack>B<,>\n"
1966 "B< void *>I<ptid>B<, void *>I<ctid>B<,>\n"
1967 "B< struct pt_regs *>I<regs>B<);>\n"
1970 #: build/C/man2/clone.2:822
1972 "Another difference for the raw system call is that the I<child_stack> "
1973 "argument may be zero, in which case copy-on-write semantics ensure that the "
1974 "child gets separate copies of stack pages when either process modifies the "
1975 "stack. In this case, for correct operation, the B<CLONE_VM> option should "
1978 "生のシステムコールのもう一つの違いは、 I<child_stack> 引き数がゼロでも良いこ"
1979 "とである。この場合には、どちらかのプロセスが スタックを変更した時に、書き込み"
1980 "時コピー (copy-on-write) 方式により 子プロセスがスタック・ページの独立したコ"
1981 "ピーを得られることが保証される。 この場合、正常に動作させるためには、 "
1982 "B<CLONE_VM> オプションを指定してはならない。"
1985 #: build/C/man2/clone.2:830
1987 "For some architectures, the order of the arguments for the system call "
1988 "differs from that shown above. On the score, microblaze, ARM, ARM 64, PA-"
1989 "RISC, arc, Power PC, xtensa, and MIPS architectures, the order of the fourth "
1990 "and fifth arguments is reversed. On the cris and s390 architectures, the "
1991 "order of the first and second arguments is reversed."
1993 "いくつかのアーキテクチャでは、システムコールの引き数の順序は上記とは異なって"
1994 "いる。 microblaze, ARM, ARM 64, PA-RISC, arc, Power PC, xtensa, MIPS アーキテ"
1995 "クチャでは、 4 番目と 5 番目の引き数の順番が逆である。 cris と s390 アーキテ"
1996 "クチャでは、最初と 2 番目の引き数の順番が逆である。"
1999 #: build/C/man2/clone.2:830
2001 msgid "blackfin, m68k, and sparc"
2002 msgstr "blackfin, m68k, sparc"
2005 #: build/C/man2/clone.2:834
2007 "The argument-passing conventions on blackfin, m68k, and sparc are different "
2008 "from descriptions above. For details, see the kernel (and glibc) source."
2010 "blackfin, m68k, sparc では引き数渡しの規約が上記の説明とは異なる。 詳細は、"
2011 "カーネル (と glibc) のソースを参照のこと。"
2014 #: build/C/man2/clone.2:834
2020 #: build/C/man2/clone.2:836
2021 msgid "On ia64, a different interface is used:"
2022 msgstr "ia64 では、別のインターフェースが使用される:"
2025 #: build/C/man2/clone.2:843
2028 "B<int __clone2(int (*>I<fn>B<)(void *), >\n"
2029 "B< void *>I<child_stack_base>B<, size_t >I<stack_size>B<,>\n"
2030 "B< int >I<flags>B<, void *>I<arg>B<, ... >\n"
2031 "B< /* pid_t *>I<ptid>B<, struct user_desc *>I<tls>B<, pid_t *>I<ctid>B< */ );>\n"
2033 "B<int __clone2(int (*>I<fn>B<)(void *), >\n"
2034 "B< void *>I<child_stack_base>B<, size_t >I<stack_size>B<,>\n"
2035 "B< int >I<flags>B<, void *>I<arg>B<, ... >\n"
2036 "B< /* pid_t *>I<ptid>B<, struct user_desc *>I<tls>B<, pid_t *>I<ctid>B< */ );>\n"
2039 #: build/C/man2/clone.2:855
2041 "The prototype shown above is for the glibc wrapper function; the raw system "
2042 "call interface has no I<fn> or I<arg> argument, and changes the order of the "
2043 "arguments so that I<flags> is the first argument, and I<tls> is the last "
2046 "上記のプロトタイプは glibc ラッパー関数用のものである。 素のシステムコールの"
2047 "インターフェースには引き数 I<fn> と I<arg> がない。 また、引き数の順序が変わ"
2048 "り、 I<flags> が最初の引き数で、 I<tls> が最後の引き数である。"
2051 #: build/C/man2/clone.2:866
2053 "B<__clone2>() operates in the same way as B<clone>(), except that "
2054 "I<child_stack_base> points to the lowest address of the child's stack area, "
2055 "and I<stack_size> specifies the size of the stack pointed to by "
2056 "I<child_stack_base>."
2058 "B<__clone2>() は B<clone>() と同じように動作するが、以下の点が異なる: "
2059 "I<child_stack_base> は子プロセスのスタックエリアの最小のアドレスを指し、 "
2060 "I<stack_size> は I<child_stack_base> が指し示すスタックエリアの大きさを示す。"
2063 #: build/C/man2/clone.2:866
2065 msgid "Linux 2.4 and earlier"
2066 msgstr "Linux 2.4 以前"
2069 #: build/C/man2/clone.2:874
2071 "In Linux 2.4 and earlier, B<clone>() does not take arguments I<ptid>, "
2072 "I<tls>, and I<ctid>."
2074 "Linux 2.4 以前では、 B<clone>() は引き数 I<ptid>, I<tls>, I<ctid> を取らな"
2077 #. gettid(2) returns current->pid;
2078 #. getpid(2) returns current->tgid;
2080 #: build/C/man2/clone.2:883
2082 "On success, the thread ID of the child process is returned in the caller's "
2083 "thread of execution. On failure, -1 is returned in the caller's context, no "
2084 "child process will be created, and I<errno> will be set appropriately."
2086 "成功した場合、呼び出し元の実行スレッドには子プロセスのスレッドID が返され"
2087 "る。 失敗した場合、 呼び出し元のコンテキストには -1 が返され、子プロセスは 作"
2088 "成されず、 I<errno> が適切に設定される。"
2091 #: build/C/man2/clone.2:883 build/C/man2/kcmp.2:167
2092 #: build/C/man2/sched_get_priority_max.2:108 build/C/man3/sched_getcpu.3:65
2093 #: build/C/man2/sched_rr_get_interval.2:80
2094 #: build/C/man2/sched_setaffinity.2:116 build/C/man2/sched_setparam.2:96
2095 #: build/C/man2/sched_setscheduler.2:432 build/C/man2/sched_yield.2:48
2096 #: build/C/man2/setns.2:77 build/C/man2/unshare.2:212
2102 #: build/C/man2/clone.2:884
2108 #: build/C/man2/clone.2:887
2109 msgid "Too many processes are already running."
2110 msgstr "すでに実行中のプロセスが多すぎる。"
2113 #: build/C/man2/clone.2:887 build/C/man2/clone.2:894 build/C/man2/clone.2:909
2114 #: build/C/man2/clone.2:917 build/C/man2/clone.2:925 build/C/man2/clone.2:933
2115 #: build/C/man2/clone.2:939 build/C/man2/clone.2:949 build/C/man2/clone.2:957
2116 #: build/C/man2/clone.2:965 build/C/man2/kcmp.2:178
2117 #: build/C/man2/sched_get_priority_max.2:109
2118 #: build/C/man2/sched_rr_get_interval.2:84
2119 #: build/C/man2/sched_setaffinity.2:120 build/C/man2/sched_setaffinity.2:128
2120 #: build/C/man2/sched_setparam.2:97 build/C/man2/sched_setscheduler.2:433
2121 #: build/C/man2/setns.2:82 build/C/man2/unshare.2:213
2127 #: build/C/man2/clone.2:894
2129 "B<CLONE_SIGHAND> was specified, but B<CLONE_VM> was not. (Since Linux 2.6.0-"
2132 "B<CLONE_SIGHAND> が指定されていたが、 B<CLONE_VM> が指定されていなかった。 "
2133 "(Linux 2.6.0-test6 以降)"
2138 #. .B CLONE_DETACHED
2142 #. (Since Linux 2.6.0-test6.)
2144 #: build/C/man2/clone.2:909
2146 "B<CLONE_THREAD> was specified, but B<CLONE_SIGHAND> was not. (Since Linux "
2149 "B<CLONE_THREAD> が指定されていたが、 B<CLONE_SIGHAND> が指定されていなかっ"
2150 "た。 (Linux 2.5.35 以降)"
2153 #: build/C/man2/clone.2:917
2154 msgid "Both B<CLONE_FS> and B<CLONE_NEWNS> were specified in I<flags>."
2155 msgstr "B<CLONE_FS> と B<CLONE_NEWNS> の両方が I<flags> に指定された。"
2158 #: build/C/man2/clone.2:925
2159 msgid "Both B<CLONE_NEWIPC> and B<CLONE_SYSVSEM> were specified in I<flags>."
2160 msgstr "B<CLONE_NEWIPC> と B<CLONE_SYSVSEM> の両方が I<flags> に指定された。"
2163 #: build/C/man2/clone.2:933
2164 msgid "Both B<CLONE_NEWPID> and B<CLONE_THREAD> were specified in I<flags>."
2165 msgstr "B<CLONE_NEWPID> と B<CLONE_THREAD> の両方が I<flags> に指定された。"
2168 #: build/C/man2/clone.2:939
2170 "Returned by B<clone>() when a zero value is specified for I<child_stack>."
2171 msgstr "I<child_stack> にゼロを指定した場合に B<clone>() が返す。"
2174 #: build/C/man2/clone.2:949
2176 "B<CLONE_NEWIPC> was specified in I<flags>, but the kernel was not configured "
2177 "with the B<CONFIG_SYSVIPC> and B<CONFIG_IPC_NS> options."
2179 "I<flags> に B<CLONE_NEWIPC> が指定されたが、カーネルでオプション "
2180 "B<CONFIG_SYSVIPC> と B<CONFIG_IPC_NS> が有効になっていなかった。"
2183 #: build/C/man2/clone.2:957
2185 "B<CLONE_NEWNET> was specified in I<flags>, but the kernel was not configured "
2186 "with the B<CONFIG_NET_NS> option."
2188 "I<flags> に B<CLONE_NEWNET> が指定されたが、カーネルでオプション "
2189 "B<CONFIG_NET_NS> が有効になっていなかった。"
2192 #: build/C/man2/clone.2:965
2194 "B<CLONE_NEWPID> was specified in I<flags>, but the kernel was not configured "
2195 "with the B<CONFIG_PID_NS> option."
2197 "I<flags> に B<CLONE_NEWPID> が指定されたが、カーネルでオプション "
2198 "B<CONFIG_PID_NS> が有効になっていなかった。"
2201 #: build/C/man2/clone.2:973
2203 "B<CLONE_NEWUTS> was specified in I<flags>, but the kernel was not configured "
2204 "with the B<CONFIG_UTS> option."
2206 "I<flags> に B<CLONE_NEWUTS> が指定されたが、カーネルでオプション "
2207 "B<CONFIG_UTS> が有効になっていなかった。"
2210 #: build/C/man2/clone.2:973 build/C/man2/setns.2:89 build/C/man2/unshare.2:217
2216 #: build/C/man2/clone.2:978
2218 "Cannot allocate sufficient memory to allocate a task structure for the "
2219 "child, or to copy those parts of the caller's context that need to be copied."
2221 "子プロセスのために確保すべきタスク構造体や、呼び出し元のコンテキストの 一部を"
2222 "コピーするのに必要なメモリを十分に割り当てることができない。"
2225 #: build/C/man2/clone.2:978 build/C/man2/clone.2:987 build/C/man2/kcmp.2:182
2226 #: build/C/man2/sched_setaffinity.2:135 build/C/man2/sched_setparam.2:101
2227 #: build/C/man2/sched_setscheduler.2:438 build/C/man2/setns.2:92
2228 #: build/C/man2/unshare.2:221
2234 #: build/C/man2/clone.2:987
2236 "B<CLONE_NEWIPC>, B<CLONE_NEWNET>, B<CLONE_NEWNS>, B<CLONE_NEWPID>, or "
2237 "B<CLONE_NEWUTS> was specified by an unprivileged process (process without "
2238 "B<CAP_SYS_ADMIN>)."
2240 "非特権プロセス (B<CAP_SYS_ADMIN> を持たないプロセス) が B<CLONE_NEWIPC>, "
2241 "B<CLONE_NEWNET>, B<CLONE_NEWNS>, B<CLONE_NEWPID>, B<CLONE_NEWUTS> を指定し"
2245 #: build/C/man2/clone.2:991
2246 msgid "B<CLONE_PID> was specified by a process other than process 0."
2247 msgstr "PID が 0 以外のプロセスによって B<CLONE_PID> が指定された。"
2250 #: build/C/man2/clone.2:998
2252 "There is no entry for B<clone>() in libc5. glibc2 provides B<clone>() as "
2253 "described in this manual page."
2255 "libc5 には B<clone>() はない。glibc2 では B<clone>() が提供されており、この"
2256 "マニュアルページに記載の通りである。"
2259 #: build/C/man2/clone.2:1002
2261 "B<clone>() is Linux-specific and should not be used in programs intended to "
2264 "B<clone>() は Linux 特有であり、移植を考慮したプログラムでは使用すべき ではな"
2268 #: build/C/man2/clone.2:1012
2270 "In the kernel 2.4.x series, B<CLONE_THREAD> generally does not make the "
2271 "parent of the new thread the same as the parent of the calling process. "
2272 "However, for kernel versions 2.4.7 to 2.4.18 the B<CLONE_THREAD> flag "
2273 "implied the B<CLONE_PARENT> flag (as in kernel 2.6)."
2275 "カーネル 2.4.x 系列では、一般的には B<CLONE_THREAD> フラグを指定しても新しい"
2276 "スレッドの親を 呼び出し元プロセスの親と同じにはしない。 しかし、バージョン "
2277 "2.4.7〜2.4.18 のカーネルでは、 (カーネル 2.6 と同じように) CLONE_THREAD フラ"
2278 "グを指定すると、 暗黙のうちに CLONE_PARENT フラグを指定したことになる。"
2281 #: build/C/man2/clone.2:1022
2283 "For a while there was B<CLONE_DETACHED> (introduced in 2.5.32): parent wants "
2284 "no child-exit signal. In 2.6.2 the need to give this together with "
2285 "B<CLONE_THREAD> disappeared. This flag is still defined, but has no effect."
2287 "B<CLONE_DETACHED> というフラグが、2.5.32 で導入されて以来しばらくの間存在し"
2288 "た。 このフラグは親プロセスが子プロセス終了のシグナルを必要としないことを 表"
2289 "すものである。 2.6.2 で、 CLONE_DETATCHED を CLONE_THREAD と一緒に指定する必"
2290 "要はなくなった。 このフラグはまだ定義されているが、何の効果もない。"
2293 #: build/C/man2/clone.2:1027
2295 "On i386, B<clone>() should not be called through vsyscall, but directly "
2296 "through I<int $0x80>."
2298 "i386 上では、 B<clone>() は vsyscall 経由ではなく、直接 I<int $0x80> 経由で"
2302 #: build/C/man2/clone.2:1058
2304 "Versions of the GNU C library that include the NPTL threading library "
2305 "contain a wrapper function for B<getpid>(2) that performs caching of PIDs. "
2306 "This caching relies on support in the glibc wrapper for B<clone>(), but as "
2307 "currently implemented, the cache may not be up to date in some "
2308 "circumstances. In particular, if a signal is delivered to the child "
2309 "immediately after the B<clone>() call, then a call to B<getpid>(2) in a "
2310 "handler for the signal may return the PID of the calling process (\"the "
2311 "parent\"), if the clone wrapper has not yet had a chance to update the PID "
2312 "cache in the child. (This discussion ignores the case where the child was "
2313 "created using B<CLONE_THREAD>, when B<getpid>(2) I<should> return the same "
2314 "value in the child and in the process that called B<clone>(), since the "
2315 "caller and the child are in the same thread group. The stale-cache problem "
2316 "also does not occur if the I<flags> argument includes B<CLONE_VM>.) To get "
2317 "the truth, it may be necessary to use code such as the following:"
2319 "NPTL スレッド・ライブラリを含んでいる GNU C ライブラリのいくつかのバージョン "
2320 "には、 B<getpid>(2) のラッパー関数が含まれており、このラッパー関数は PID を"
2321 "キャッシュする。 このキャッシュ処理が正しく動作するためには glibc の B<clone>"
2322 "() のラッパー関数での助けが必要だが、現状の実装では、 ある状況下において"
2323 "キャッシュが最新とならない可能性がある。 特に、 B<clone>() の呼び出し直後に"
2324 "シグナルが子プロセスに配送された場合に、 そのシグナルに対するハンドラ内で "
2325 "B<getpid>(2) を呼び出すと、それまでに clone のラッパー関数が子プロセスの "
2326 "PID キャッシュを 更新する機会が得られていなければ、呼び出し元プロセス (\"親プ"
2327 "ロセス\") の PID が 返される可能性がある。 (この議論では、子プロセスが "
2328 "B<CLONE_THREAD> を使って作成された場合のことは無視している。 子プロセスが "
2329 "B<CLONE_THREAD> を作って作成された場合には、 呼び出し元と子プロセスは同じス"
2330 "レッド・グループに属すので、 B<getpid>(2) は子プロセスと B<clone>() を呼び"
2331 "出したプロセスで同じ値を返すのが「正しい」。 キャッシュが最新とならない問題 "
2332 "(stale-cache problem) は、 I<flags> に B<CLONE_VM> が含まれている場合にも発生"
2333 "しない。) 本当の値を得るためには、次のようなコードを使う必要があるかもしれな"
2337 #: build/C/man2/clone.2:1061
2339 msgid " #include E<lt>syscall.hE<gt>\n"
2340 msgstr " #include E<lt>syscall.hE<gt>\n"
2343 #: build/C/man2/clone.2:1063
2345 msgid " pid_t mypid;\n"
2346 msgstr " pid_t mypid;\n"
2349 #: build/C/man2/clone.2:1065
2351 msgid " mypid = syscall(SYS_getpid);\n"
2352 msgstr " mypid = syscall(SYS_getpid);\n"
2355 #: build/C/man2/clone.2:1070
2357 msgid "Create a child that executes in a separate UTS namespace"
2358 msgstr "別の UTS 名前空間で動作する子プロセスを作成する"
2361 #: build/C/man2/clone.2:1080
2363 "The following program demonstrates the use of B<clone>() to create a child "
2364 "process that executes in a separate UTS namespace. The child changes the "
2365 "hostname in its UTS namespace. Both parent and child then display the "
2366 "system hostname, making it possible to see that the hostname differs in the "
2367 "UTS namespaces of the parent and child. For an example of the use of this "
2368 "program, see B<setns>(2)."
2370 "以下のプログラムは、 別の UTS 名前空間で動作する子プロセスを B<clone>() を"
2371 "使って作成する例である。 子プロセスは、自分の UTS 名前空間においてホスト名を"
2372 "変更する。 それから、親プロセスと子プロセスの両方でシステムのホスト名を表示"
2373 "し、 親プロセスと子プロセスの UTS 名前空間でホスト名が異なることを確認する。 "
2374 "このプログラムの使用方法については B<setns>(2) を参照。"
2377 #: build/C/man2/clone.2:1090
2380 "#define _GNU_SOURCE\n"
2381 "#include E<lt>sys/wait.hE<gt>\n"
2382 "#include E<lt>sys/utsname.hE<gt>\n"
2383 "#include E<lt>sched.hE<gt>\n"
2384 "#include E<lt>string.hE<gt>\n"
2385 "#include E<lt>stdio.hE<gt>\n"
2386 "#include E<lt>stdlib.hE<gt>\n"
2387 "#include E<lt>unistd.hE<gt>\n"
2389 "#define _GNU_SOURCE\n"
2390 "#include E<lt>sys/wait.hE<gt>\n"
2391 "#include E<lt>sys/utsname.hE<gt>\n"
2392 "#include E<lt>sched.hE<gt>\n"
2393 "#include E<lt>string.hE<gt>\n"
2394 "#include E<lt>stdio.hE<gt>\n"
2395 "#include E<lt>stdlib.hE<gt>\n"
2396 "#include E<lt>unistd.hE<gt>\n"
2399 #: build/C/man2/clone.2:1093 build/C/man2/setns.2:177
2402 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2405 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
2409 #: build/C/man2/clone.2:1098
2412 "static int /* Start function for cloned child */\n"
2413 "childFunc(void *arg)\n"
2415 " struct utsname uts;\n"
2417 "static int /* clone された子プロセスの開始関数 */\n"
2418 "childFunc(void *arg)\n"
2420 " struct utsname uts;\n"
2423 #: build/C/man2/clone.2:1100
2425 msgid " /* Change hostname in UTS namespace of child */\n"
2426 msgstr " /* 子プロセスの UTS 名前空間でホスト名を変更する */\n"
2429 #: build/C/man2/clone.2:1103
2432 " if (sethostname(arg, strlen(arg)) == -1)\n"
2433 " errExit(\"sethostname\");\n"
2435 " if (sethostname(arg, strlen(arg)) == -1)\n"
2436 " errExit(\"sethostname\");\n"
2439 #: build/C/man2/clone.2:1105
2441 msgid " /* Retrieve and display hostname */\n"
2442 msgstr " /* ホスト名を取得し表示する */\n"
2445 #: build/C/man2/clone.2:1109
2448 " if (uname(&uts) == -1)\n"
2449 " errExit(\"uname\");\n"
2450 " printf(\"uts.nodename in child: %s\\en\", uts.nodename);\n"
2452 " if (uname(&uts) == -1)\n"
2453 " errExit(\"uname\");\n"
2454 " printf(\"uts.nodename in child: %s\\en\", uts.nodename);\n"
2457 #: build/C/man2/clone.2:1113
2460 " /* Keep the namespace open for a while, by sleeping.\n"
2461 " This allows some experimentation--for example, another\n"
2462 " process might join the namespace. */\n"
2464 " /* sleep を使ってしばらく名前空間をオープンされたままにする。\n"
2465 " これにより実験を行うことができる -- 例えば、\n"
2466 " 別のプロセスがこの名前空間に参加するなど。 */\n"
2469 #: build/C/man2/clone.2:1115
2471 msgid " sleep(200);\n"
2472 msgstr " sleep(200);\n"
2475 #: build/C/man2/clone.2:1118
2478 " return 0; /* Child terminates now */\n"
2481 " return 0; /* 子プロセスを終了する */\n"
2485 #: build/C/man2/clone.2:1120
2487 msgid "#define STACK_SIZE (1024 * 1024) /* Stack size for cloned child */\n"
2488 msgstr "#define STACK_SIZE (1024 * 1024) /* clone される子プロセスのスタックサイズ */\n"
2491 #: build/C/man2/clone.2:1128
2495 "main(int argc, char *argv[])\n"
2497 " char *stack; /* Start of stack buffer */\n"
2498 " char *stackTop; /* End of stack buffer */\n"
2500 " struct utsname uts;\n"
2503 "main(int argc, char *argv[])\n"
2505 " char *stack; /* スタックバッファの先頭 */\n"
2506 " char *stackTop; /* スタックバッファの末尾 */\n"
2508 " struct utsname uts;\n"
2511 #: build/C/man2/clone.2:1133
2514 " if (argc E<lt> 2) {\n"
2515 " fprintf(stderr, \"Usage: %s E<lt>child-hostnameE<gt>\\en\", argv[0]);\n"
2516 " exit(EXIT_SUCCESS);\n"
2519 " if (argc E<lt> 2) {\n"
2520 " fprintf(stderr, \"Usage: %s E<lt>child-hostnameE<gt>\\en\", argv[0]);\n"
2521 " exit(EXIT_SUCCESS);\n"
2525 #: build/C/man2/clone.2:1135
2527 msgid " /* Allocate stack for child */\n"
2528 msgstr " /* 子プロセス用のスタックを割り当てる */\n"
2531 #: build/C/man2/clone.2:1140
2534 " stack = malloc(STACK_SIZE);\n"
2535 " if (stack == NULL)\n"
2536 " errExit(\"malloc\");\n"
2537 " stackTop = stack + STACK_SIZE; /* Assume stack grows downward */\n"
2539 " stack = malloc(STACK_SIZE);\n"
2540 " if (stack == NULL)\n"
2541 " errExit(\"malloc\");\n"
2542 " stackTop = stack + STACK_SIZE; /* スタックは下方向に伸びるものとする */\n"
2545 #: build/C/man2/clone.2:1143
2548 " /* Create child that has its own UTS namespace;\n"
2549 " child commences execution in childFunc() */\n"
2551 " /* 自分専用の UTS 名前空間を持つ子プロセスを作成する;\n"
2552 " 子プロセスは childFunc() の実行を開始する */\n"
2555 #: build/C/man2/clone.2:1148
2558 " pid = clone(childFunc, stackTop, CLONE_NEWUTS | SIGCHLD, argv[1]);\n"
2560 " errExit(\"clone\");\n"
2561 " printf(\"clone() returned %ld\\en\", (long) pid);\n"
2563 " pid = clone(childFunc, stackTop, CLONE_NEWUTS | SIGCHLD, argv[1]);\n"
2565 " errExit(\"clone\");\n"
2566 " printf(\"clone() returned %ld\\en\", (long) pid);\n"
2569 #: build/C/man2/clone.2:1150
2571 msgid " /* Parent falls through to here */\n"
2572 msgstr " /* 親プロセスの実行はここに来る */\n"
2575 #: build/C/man2/clone.2:1152
2577 msgid " sleep(1); /* Give child time to change its hostname */\n"
2578 msgstr " sleep(1); /* 子プロセスがホスト名を変更する時間を与える */\n"
2581 #: build/C/man2/clone.2:1155
2584 " /* Display hostname in parent\\(aqs UTS namespace. This will be\n"
2585 " different from hostname in child\\(aqs UTS namespace. */\n"
2587 " /* 親プロセスの UTS 名前空間でのホスト名を表示する;\n"
2588 " これは子プロセスの UTS 名前空間でのホスト名とは異なる */\n"
2591 #: build/C/man2/clone.2:1159
2594 " if (uname(&uts) == -1)\n"
2595 " errExit(\"uname\");\n"
2596 " printf(\"uts.nodename in parent: %s\\en\", uts.nodename);\n"
2598 " if (uname(&uts) == -1)\n"
2599 " errExit(\"uname\");\n"
2600 " printf(\"uts.nodename in parent: %s\\en\", uts.nodename);\n"
2603 #: build/C/man2/clone.2:1163
2606 " if (waitpid(pid, NULL, 0) == -1) /* Wait for child */\n"
2607 " errExit(\"waitpid\");\n"
2608 " printf(\"child has terminated\\en\");\n"
2610 " if (waitpid(pid, NULL, 0) == -1) /* 子プロセスを待つ */\n"
2611 " errExit(\"waitpid\");\n"
2612 " printf(\"child has terminated\\en\");\n"
2615 #: build/C/man2/clone.2:1166
2618 " exit(EXIT_SUCCESS);\n"
2621 " exit(EXIT_SUCCESS);\n"
2625 #: build/C/man2/clone.2:1181
2627 "B<fork>(2), B<futex>(2), B<getpid>(2), B<gettid>(2), B<kcmp>(2), "
2628 "B<set_thread_area>(2), B<set_tid_address>(2), B<setns>(2), B<tkill>(2), "
2629 "B<unshare>(2), B<wait>(2), B<capabilities>(7), B<pthreads>(7)"
2631 "B<fork>(2), B<futex>(2), B<getpid>(2), B<gettid>(2), B<kcmp>(2), "
2632 "B<set_thread_area>(2), B<set_tid_address>(2), B<setns>(2), B<tkill>(2), "
2633 "B<unshare>(2), B<wait>(2), B<capabilities>(7), B<pthreads>(7)"
2636 #: build/C/man2/kcmp.2:28
2642 #: build/C/man2/kcmp.2:28
2648 #: build/C/man2/kcmp.2:31
2650 "kcmp - compare two processes to determine if they share a kernel resource"
2654 #: build/C/man2/kcmp.2:34
2656 msgid "B<#include E<lt>linux/kcmp.hE<gt>>\n"
2657 msgstr "B<#include E<lt>linux/kcmp.hE<gt>>\n"
2660 #: build/C/man2/kcmp.2:37
2663 "B<int kcmp(pid_t >I<pid1>B<, pid_t >I<pid2>B<, int >I<type>B<,>\n"
2664 "B< unsigned long >I<idx1>B<, unsigned long >I<idx2>B<);>\n"
2666 "B<int kcmp(pid_t >I<pid1>B<, pid_t >I<pid2>B<, int >I<type>B<,>\n"
2667 "B< unsigned long >I<idx1>B<, unsigned long >I<idx2>B<);>\n"
2670 #: build/C/man2/kcmp.2:41
2671 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
2673 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
2677 #: build/C/man2/kcmp.2:50
2679 "The B<kcmp>() system call can be used to check whether the two processes "
2680 "identified by I<pid1> and I<pid2> share a kernel resource such as virtual "
2681 "memory, file descriptors, and so on."
2685 #: build/C/man2/kcmp.2:55
2687 "The I<type> argument specifies which resource is to be compared in the two "
2688 "processes. It has one of the following values:"
2690 "I<type> 引き数は 2 つのプロセス間でどのリソースを比較するかを指定する。 以下"
2694 #: build/C/man2/kcmp.2:55
2696 msgid "B<KCMP_FILE>"
2697 msgstr "B<KCMP_FILE>"
2700 #: build/C/man2/kcmp.2:67
2702 "Check whether a file descriptor I<idx1> in the process I<pid1> refers to the "
2703 "same open file description (see B<open>(2)) as file descriptor I<idx2> in "
2704 "the process I<pid2>."
2708 #: build/C/man2/kcmp.2:67
2710 msgid "B<KCMP_FILES>"
2711 msgstr "B<KCMP_FILES>"
2714 #: build/C/man2/kcmp.2:75
2716 "Check whether the process share the same set of open file descriptors. The "
2717 "arguments I<idx1> and I<idx2> are ignored."
2721 #: build/C/man2/kcmp.2:75
2727 #: build/C/man2/kcmp.2:84
2729 "Check whether the processes share the same file system information (i.e., "
2730 "file mode creation mask, working directory, and file system root). The "
2731 "arguments I<idx1> and I<idx2> are ignored."
2735 #: build/C/man2/kcmp.2:84
2741 #: build/C/man2/kcmp.2:92
2743 "Check whether the processes share I/O context. The arguments I<idx1> and "
2744 "I<idx2> are ignored."
2748 #: build/C/man2/kcmp.2:92
2750 msgid "B<KCMP_SIGHAND>"
2751 msgstr "B<KCMP_SIGHAND>"
2754 #: build/C/man2/kcmp.2:100
2756 "Check whether the processes share the same table of signal dispositions. "
2757 "The arguments I<idx1> and I<idx2> are ignored."
2761 #: build/C/man2/kcmp.2:100
2763 msgid "B<KCMP_SYSVSEM>"
2764 msgstr "B<KCMP_SYSVSEM>"
2767 #: build/C/man2/kcmp.2:109
2769 "Check whether the processes share the same list of System V semaphore undo "
2770 "operations. The arguments I<idx1> and I<idx2> are ignored."
2774 #: build/C/man2/kcmp.2:109
2780 #: build/C/man2/kcmp.2:117
2782 "Check whether the processes share the same address space. The arguments "
2783 "I<idx1> and I<idx2> are ignored."
2787 #: build/C/man2/kcmp.2:124
2789 "Note the B<kcmp>() is not protected against false positives which may have "
2790 "place if tasks are running. Which means one should stop tasks being "
2791 "inspected with this syscall to obtain meaningful results."
2795 #: build/C/man2/kcmp.2:130
2797 "The return value of a successful call to B<kcmp>() is simply the result of "
2798 "arithmetic comparison of kernel pointers (when the kernel compares "
2799 "resources, it uses their memory addresses)."
2803 #: build/C/man2/kcmp.2:138
2805 "The easiest way to explain is to consider an example. Suppose that I<v1> "
2806 "and I<v2> are the addresses of appropriate resources, then the return value "
2807 "is one of the following:"
2811 #: build/C/man2/kcmp.2:139
2817 #: build/C/man2/kcmp.2:144
2819 "I<v1> is equal to I<v2>; in other words, the two processes share the "
2824 #: build/C/man2/kcmp.2:144
2830 #: build/C/man2/kcmp.2:148
2831 msgid "I<v1> is less than I<v2>."
2835 #: build/C/man2/kcmp.2:148
2841 #: build/C/man2/kcmp.2:152
2842 msgid "I<v1> is greater than I<v2>."
2846 #: build/C/man2/kcmp.2:152
2852 #: build/C/man2/kcmp.2:157
2853 msgid "I<v1> is not equal to I<v2>, but ordering information is unavailable."
2857 #: build/C/man2/kcmp.2:162
2858 msgid "On error, -1 is returned, and I<errno> is set appropriately."
2859 msgstr "エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
2862 #: build/C/man2/kcmp.2:167
2864 "B<kcmp ()> was designed to return values suitable for sorting. This is "
2865 "particularly handy if one needs to compare a large number of file "
2870 #: build/C/man2/kcmp.2:168 build/C/man2/setns.2:78
2876 #: build/C/man2/kcmp.2:178
2878 "I<type> is B<KCMP_FILE> and I<fd1> or I<fd2> is not an open file descriptor."
2882 #: build/C/man2/kcmp.2:182
2883 msgid "I<type> is invalid."
2887 #: build/C/man2/kcmp.2:188
2889 "Insufficient permission to inspect process resources. The B<CAP_SYS_PTRACE> "
2890 "capability is required to inspect processes that you do not own."
2894 #: build/C/man2/kcmp.2:188 build/C/man2/sched_rr_get_interval.2:90
2895 #: build/C/man2/sched_setaffinity.2:145 build/C/man2/sched_setparam.2:107
2896 #: build/C/man2/sched_setscheduler.2:441
2902 #: build/C/man2/kcmp.2:195
2903 msgid "Process I<pid1> or I<pid2> does not exist."
2907 #: build/C/man2/kcmp.2:199
2908 msgid "The B<kcmp>() system call first appeared in Linux 3.5."
2909 msgstr "B<kcmp>() システムコールは Linux 3.5 で初めて登場した。"
2912 #: build/C/man2/kcmp.2:202
2914 "B<kcmp>() is Linux specific and should not be used in programs intended to "
2917 "B<kcmp>() は Linux 特有であり、 移植を考慮したプログラムでは使用すべきではな"
2921 #: build/C/man2/kcmp.2:205
2923 "Glibc does not provide a wrapper for this system call; call it using "
2928 #: build/C/man2/kcmp.2:214
2930 "This system call is available only if the kernel was configured with "
2931 "B<CONFIG_CHECKPOINT_RESTORE>. The main use of the system call is for the "
2932 "checkpoint/restore in user space (CRIU) feature. The alternative to this "
2933 "system call would have been to expose suitable process information via the "
2934 "B<proc>(5) file system; this was deemed to be unsuitable for security "
2939 #: build/C/man2/kcmp.2:219
2941 "See B<clone>(2) for some background information on the shared resources "
2942 "referred to on this page."
2946 #: build/C/man2/kcmp.2:222
2947 msgid "B<clone>(2), B<unshare>(2)"
2951 #: build/C/man2/sched_get_priority_max.2:29
2953 msgid "SCHED_GET_PRIORITY_MAX"
2954 msgstr "SCHED_GET_PRIORITY_MAX"
2957 #: build/C/man2/sched_get_priority_max.2:29
2963 #: build/C/man2/sched_get_priority_max.2:32
2965 "sched_get_priority_max, sched_get_priority_min - get static priority range"
2967 "sched_get_priority_max, sched_get_priority_min - 静的プライオリティの範囲を取"
2971 #: build/C/man2/sched_get_priority_max.2:34
2972 #: build/C/man2/sched_rr_get_interval.2:34 build/C/man2/sched_yield.2:34
2973 msgid "B<#include E<lt>sched.hE<gt>>"
2974 msgstr "B<#include E<lt>sched.hE<gt>>"
2977 #: build/C/man2/sched_get_priority_max.2:36
2978 msgid "B<int sched_get_priority_max(int >I<policy>B<);>"
2979 msgstr "B<int sched_get_priority_max(int >I<policy>B<);>"
2982 #: build/C/man2/sched_get_priority_max.2:38
2983 msgid "B<int sched_get_priority_min(int >I<policy>B<);>"
2984 msgstr "B<int sched_get_priority_min(int >I<policy>B<);>"
2987 #: build/C/man2/sched_get_priority_max.2:57
2989 "B<sched_get_priority_max>() returns the maximum priority value that can be "
2990 "used with the scheduling algorithm identified by I<policy>. "
2991 "B<sched_get_priority_min>() returns the minimum priority value that can be "
2992 "used with the scheduling algorithm identified by I<policy>. Supported "
2993 "I<policy> values are B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER>, and "
2994 "B<SCHED_BATCH>. Further details about these policies can be found in "
2995 "B<sched_setscheduler>(2)."
2997 "B<sched_get_priority_max>() はI<policy> によって指定されたスケジューリングの"
2998 "アルゴリズムで 使用されるプライオリティの最大値を返す。 "
2999 "B<sched_get_priority_min>() はI<policy> によって指定されたスケジューリングの"
3000 "アルゴリズムで 使用されるプライオリティの最小値を返す。 サポートされる "
3001 "I<policy> の値は B<SCHED_FIFO>、 B<SCHED_RR>、 B<SCHED_OTHER>、 "
3002 "B<SCHED_BATCH> である。これらのスケジューリング方針に関する詳細は "
3003 "B<sched_setscheduler>(2) に書かれている。"
3006 #: build/C/man2/sched_get_priority_max.2:66
3008 "Processes with numerically higher priority values are scheduled before "
3009 "processes with numerically lower priority values. Thus, the value returned "
3010 "by B<sched_get_priority_max>() will be greater than the value returned by "
3011 "B<sched_get_priority_min>()."
3013 "数値的に大きなプライオリティ値を持つプロセスは小さな プライオリティ値を持つプ"
3014 "ロセスより前にスケジュールされる。 このため B<sched_get_priority_max>() が返"
3015 "す値は B<sched_get_priority_min>() が返す値よりも大きい。"
3018 #: build/C/man2/sched_get_priority_max.2:77
3020 "Linux allows the static priority value range 1 to 99 for B<SCHED_FIFO> and "
3021 "B<SCHED_RR> and the priority 0 for B<SCHED_OTHER> and B<SCHED_BATCH>. "
3022 "Scheduling priority ranges for the various policies are not alterable."
3024 "Linux では B<SCHED_FIFO> と B<SCHED_RR> では 1 から 99 の範囲の 静的プライオ"
3025 "リティーを持ち、B<SCHED_OTHER> と B<SCHED_BATCH> では プライオリティとして 0 "
3026 "を持つ。 それぞれの方針のスケジューリング・プライオリティの範囲は 変更するこ"
3030 #: build/C/man2/sched_get_priority_max.2:89
3032 "The range of scheduling priorities may vary on other POSIX systems, thus it "
3033 "is a good idea for portable applications to use a virtual priority range and "
3034 "map it to the interval given by B<sched_get_priority_max>() and "
3035 "B<sched_get_priority_min>(). POSIX.1-2001 requires a spread of at least 32 "
3036 "between the maximum and the minimum values for B<SCHED_FIFO> and B<SCHED_RR>."
3038 "スケジューリング・プライオリティの範囲は他の POSIX システムと 異なっているか"
3039 "もしれない。それで、移植性(portable)のある アプリケーションでは仮想的な範囲を"
3040 "用い B<sched_get_priority_max>() と B<sched_get_priority_min>() で与えられ"
3041 "た間隔にマップして使用することはいい考えである。 POSIX.1-2001 では "
3042 "B<SCHED_FIFO> と B<SCHED_RR> における 最大値と最小値の間隔を少なくとも 32 に"
3046 #: build/C/man2/sched_get_priority_max.2:98
3048 "POSIX systems on which B<sched_get_priority_max>() and "
3049 "B<sched_get_priority_min>() are available define "
3050 "B<_POSIX_PRIORITY_SCHEDULING> in I<E<lt>unistd.hE<gt>>."
3052 "POSIX システムでは B<sched_get_priority_max>() と B<sched_get_priority_min>"
3053 "() は I<E<lt>unistd.hE<gt>> に B<_POSIX_PRIORITY_SCHEDULING> が定義されてい"
3057 #: build/C/man2/sched_get_priority_max.2:108
3059 "On success, B<sched_get_priority_max>() and B<sched_get_priority_min>() "
3060 "return the maximum/minimum priority value for the named scheduling policy. "
3061 "On error, -1 is returned, and I<errno> is set appropriately."
3063 "成功した場合は B<sched_get_priority_max>() と B<sched_get_priority_min>() "
3064 "は指定されたスケジューリング方針のプライオリティの最大値/最小値を返す。 エ"
3065 "ラーの場合は -1 が返され、 I<errno> が適切に設定される。"
3068 #: build/C/man2/sched_get_priority_max.2:114
3069 msgid "The argument I<policy> does not identify a defined scheduling policy."
3070 msgstr "引き数 I<policy> が定義されているスケジューリング方針と一致しない。"
3073 #: build/C/man2/sched_get_priority_max.2:116
3074 #: build/C/man2/sched_rr_get_interval.2:96 build/C/man2/sched_setparam.2:112
3075 #: build/C/man2/sched_yield.2:54
3076 msgid "POSIX.1-2001."
3077 msgstr "POSIX.1-2001."
3080 #: build/C/man2/sched_get_priority_max.2:125
3082 "B<sched_getaffinity>(2), B<sched_getparam>(2), B<sched_getscheduler>(2), "
3083 "B<sched_setaffinity>(2), B<sched_setparam>(2), B<sched_setscheduler>(2)"
3085 "B<sched_getaffinity>(2), B<sched_getparam>(2) B<sched_getscheduler>(2), "
3086 "B<sched_setaffinity>(2), B<sched_setparam>(2), B<sched_setscheduler>(2),"
3089 #: build/C/man2/sched_get_priority_max.2:128
3090 #: build/C/man2/sched_rr_get_interval.2:138 build/C/man2/sched_setparam.2:134
3091 #: build/C/man2/sched_setscheduler.2:563 build/C/man2/sched_yield.2:85
3093 "I<Programming for the real world - POSIX.4> by Bill O. Gallmeister, O'Reilly "
3094 "& Associates, Inc., ISBN 1-56592-074-0."
3096 "I<Programming for the real world - POSIX.4> by Bill O. Gallmeister, O'Reilly "
3097 "& Associates, Inc., ISBN 1-56592-074-0."
3100 #: build/C/man3/sched_getcpu.3:26
3102 msgid "SCHED_GETCPU"
3103 msgstr "SCHED_GETCPU"
3106 #: build/C/man3/sched_getcpu.3:26 build/C/man2/unshare.2:20
3112 #: build/C/man3/sched_getcpu.3:29
3113 msgid "sched_getcpu - determine CPU on which the calling thread is running"
3114 msgstr "sched_getcpu - 呼び出したスレッドが実行されている CPU を知る"
3117 #: build/C/man3/sched_getcpu.3:34
3119 msgid "B<int sched_getcpu(void);>\n"
3120 msgstr "B<int sched_getcpu(void);>\n"
3123 #: build/C/man3/sched_getcpu.3:39 build/C/man2/unshare.2:33
3125 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
3126 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
3129 #: build/C/man3/sched_getcpu.3:42
3130 msgid "B<sched_getcpu>():"
3131 msgstr "B<sched_getcpu>():"
3134 #: build/C/man3/sched_getcpu.3:58
3136 "B<sched_getcpu>() returns the number of the CPU on which the calling thread "
3137 "is currently executing."
3139 "B<sched_getcpu>() は、呼び出したスレッドが現在実行されている CPU の番号を返"
3143 #: build/C/man3/sched_getcpu.3:65
3145 "On success, B<sched_getcpu>() returns a nonnegative CPU number. On error, "
3146 "-1 is returned and I<errno> is set to indicate the error."
3148 "成功すると、 B<sched_getcpu>() は非負の CPU 番号を返す。 エラーの場合、-1 を"
3149 "返し、 I<errno> にエラーを示す値を設定する。"
3152 #: build/C/man3/sched_getcpu.3:66 build/C/man2/sched_rr_get_interval.2:87
3158 #: build/C/man3/sched_getcpu.3:70
3159 msgid "This kernel does not implement B<getcpu>(2)."
3160 msgstr "このカーネルでは B<getcpu>(2) が実装されていない。"
3163 #: build/C/man3/sched_getcpu.3:72
3164 msgid "This function is available since glibc 2.6."
3165 msgstr "この関数は glibc 2.6 以降で利用可能である。"
3168 #: build/C/man3/sched_getcpu.3:75
3169 msgid "B<sched_getcpu>() is glibc specific."
3170 msgstr "B<sched_getcpu>() は glibc 固有である。"
3173 #: build/C/man3/sched_getcpu.3:77
3178 #: build/C/man3/sched_getcpu.3:81
3180 msgid "cpu = sched_getcpu();\n"
3181 msgstr "cpu = sched_getcpu();\n"
3184 #: build/C/man3/sched_getcpu.3:87
3185 msgid "is equivalent to the following B<getcpu>(2) call:"
3186 msgstr "は、以下の B<getcpu>(2) 呼び出しと等価である。"
3189 #: build/C/man3/sched_getcpu.3:93
3193 "s = getcpu(&c, NULL, NULL);\n"
3194 "cpu = (s == -1) ? s : c;\n"
3197 "s = getcpu(&c, NULL, NULL);\n"
3198 "cpu = (s == -1) ? s : c;\n"
3201 #: build/C/man3/sched_getcpu.3:97
3202 msgid "B<getcpu>(2)"
3203 msgstr "B<getcpu>(2)"
3206 #: build/C/man2/sched_rr_get_interval.2:29
3208 msgid "SCHED_RR_GET_INTERVAL"
3209 msgstr "SCHED_RR_GET_INTERVAL"
3212 #: build/C/man2/sched_rr_get_interval.2:29
3218 #: build/C/man2/sched_rr_get_interval.2:32
3219 msgid "sched_rr_get_interval - get the SCHED_RR interval for the named process"
3220 msgstr "sched_rr_get_interval - 指定されたプロセスの SCHED_RR 間隔を取得する"
3223 #: build/C/man2/sched_rr_get_interval.2:36
3225 "B<int sched_rr_get_interval(pid_t >I<pid>B<, struct timespec * >I<tp>B<);>"
3227 "B<int sched_rr_get_interval(pid_t >I<pid>B<, struct timespec *>I<tp>B<);>"
3230 #: build/C/man2/sched_rr_get_interval.2:47
3232 "B<sched_rr_get_interval>() writes into the I<timespec> structure pointed to "
3233 "by I<tp> the round-robin time quantum for the process identified by I<pid>. "
3234 "The specified process should be running under the B<SCHED_RR> scheduling "
3237 "B<sched_rr_get_interval>() は I<tp> で指定された I<timespec> 構造体に\n"
3238 "I<pid> で指定されたプロセスのラウンドロビン時間量 (round robin time\n"
3239 "quantum) を書き込む。指定されたプロセスは B<SCHED_RR> スケジューリング\n"
3243 #: build/C/man2/sched_rr_get_interval.2:51
3244 msgid "The I<timespec> structure has the following form:"
3245 msgstr "I<timespec> 構造体は以下の通りである:"
3248 #: build/C/man2/sched_rr_get_interval.2:58
3251 "struct timespec {\n"
3252 " time_t tv_sec; /* seconds */\n"
3253 " long tv_nsec; /* nanoseconds */\n"
3256 "struct timespec {\n"
3257 " time_t tv_sec; /* seconds */\n"
3258 " long tv_nsec; /* nanoseconds */\n"
3262 #. FIXME . On Linux, sched_rr_get_interval()
3263 #. returns the timeslice for SCHED_OTHER processes -- this timeslice
3264 #. is influenced by the nice value.
3265 #. For SCHED_FIFO processes, this always returns 0.
3266 #. The round-robin time quantum value is not alterable under Linux
3269 #: build/C/man2/sched_rr_get_interval.2:73
3271 "If I<pid> is zero, the time quantum for the calling process is written into "
3274 "I<pid> が 0 の場合、呼び出したプロセスの時間量 (time quantum) が\n"
3278 #: build/C/man2/sched_rr_get_interval.2:80
3280 "On success, B<sched_rr_get_interval>() returns 0. On error, -1 is "
3281 "returned, and I<errno> is set appropriately."
3283 "成功した場合は B<sched_rr_get_interval>() は 0 を返す。 エラーの場合は -1 が"
3284 "返され、 I<errno> が適切に設定される。"
3287 #: build/C/man2/sched_rr_get_interval.2:81
3288 #: build/C/man2/sched_setaffinity.2:117
3294 #: build/C/man2/sched_rr_get_interval.2:84
3295 msgid "Problem with copying information to user space."
3296 msgstr "情報をユーザ空間にコピーする時に問題が起きた。"
3299 #: build/C/man2/sched_rr_get_interval.2:87
3300 msgid "Invalid pid."
3301 msgstr "PID が不正である。"
3304 #: build/C/man2/sched_rr_get_interval.2:90
3305 msgid "The system call is not yet implemented (only on rather old kernels)."
3307 "システム・コールがまだ実装されていない (かなり古いカーネルにおいてのみ)。"
3310 #: build/C/man2/sched_rr_get_interval.2:94
3311 msgid "Could not find a process with the ID I<pid>."
3312 msgstr "プロセス ID が I<pid> のプロセスが見つからなかった。"
3315 #: build/C/man2/sched_rr_get_interval.2:103
3317 "POSIX systems on which B<sched_rr_get_interval>() is available define "
3318 "B<_POSIX_PRIORITY_SCHEDULING> in I<E<lt>unistd.hE<gt>>."
3320 "POSIX システムで B<sched_rr_get_interval>() は I<E<lt>unistd.hE<gt>> に\n"
3321 "B<_POSIX_PRIORITY_SCHEDULING> が定義されている場合にのみ使用可能である。"
3324 #: build/C/man2/sched_rr_get_interval.2:103
3329 #. commit a4ec24b48ddef1e93f7578be53270f0b95ad666c
3331 #: build/C/man2/sched_rr_get_interval.2:117
3333 "POSIX does not specify any mechanism for controlling the size of the round-"
3334 "robin time quantum. Older Linux kernels provide a (nonportable) method of "
3335 "doing this. The quantum can be controlled by adjusting the process's nice "
3336 "value (see B<setpriority>(2)). Assigning a negative (i.e., high) nice value "
3337 "results in a longer quantum; assigning a positive (i.e., low) nice value "
3338 "results in a shorter quantum. The default quantum is 0.1 seconds; the "
3339 "degree to which changing the nice value affects the quantum has varied "
3340 "somewhat across kernel versions. This method of adjusting the quantum was "
3341 "removed starting with Linux 2.6.24."
3343 "POSIX ではラウンドロビン時間量の大きさを制御する仕組みが規定されていない。 古"
3344 "い Linux カーネルではこれを変更する方法が提供されている (この方法に移植性はな"
3345 "い)。 プロセスの nice 値を調整することで時間量を制御できる (B<setpriority>"
3346 "(2) 参照)。 負の nice 値 (すなわち、高い nice 値) を割り当てると時間量は長く"
3347 "なり、 正の nice 値 (すなわち、低い nice 値) を割り当てると時間量は短くな"
3348 "る。 デフォルトの時間量は 0.1 秒である。 nice 値の変更が時間量にどの程度影響"
3349 "を与えるかは カーネルのバージョンにより多少異なる。時間量を調整するこのメソッ"
3350 "ドは Linux 2.6.24 以降で削除された。"
3352 #. commit ce0dbbbb30aee6a835511d5be446462388ba9eee
3354 #. As of Linux 1.3.81
3355 #. .BR sched_rr_get_interval ()
3356 #. returns with error
3357 #. ENOSYS, because SCHED_RR has not yet been fully implemented and tested
3360 #: build/C/man2/sched_rr_get_interval.2:132
3362 "Linux 3.9 added a new mechanism for adjusting (and viewing) the B<SCHED_RR> "
3363 "quantum: the I</proc/sys/kernel/sched_rr_timeslice_ms> file exposes the "
3364 "quantum as a millisecond value, whose default is 100. Writing 0 to this "
3365 "file resets the quantum to the default value."
3367 "Linux 3.9 で、 B<SCHED_RR> の時間量の調整 (と参照) を行う新しい機構が追加され"
3368 "た。 I</proc/sys/kernel/sched_rr_timeslice_ms> ファイルでミリ秒単位の時間量の"
3369 "値が参照でき、 デフォルト値は 100 である。 このファイルに 0 を書き込むと、 時"
3370 "間量をデフォルト値に戻すことができる。"
3373 #: build/C/man2/sched_rr_get_interval.2:135
3374 #: build/C/man2/sched_setaffinity.2:177
3376 "B<sched_setscheduler>(2) has a description of the Linux scheduling scheme."
3378 "B<sched_setscheduler>(2) に Linux のスケジューリング方式についての説明\n"
3382 #: build/C/man2/sched_setaffinity.2:34
3384 msgid "SCHED_SETAFFINITY"
3385 msgstr "SCHED_SETAFFINITY"
3388 #: build/C/man2/sched_setaffinity.2:34
3394 #: build/C/man2/sched_setaffinity.2:38
3396 "sched_setaffinity, sched_getaffinity - set and get a process's CPU affinity "
3399 "sched_setaffinity, sched_getaffinity - プロセスの CPU affinity マスクを設定・"
3403 #: build/C/man2/sched_setaffinity.2:45
3406 "B<int sched_setaffinity(pid_t >I<pid>B<, size_t >I<cpusetsize>B<,>\n"
3407 "B< cpu_set_t *>I<mask>B<);>\n"
3409 "B<int sched_setaffinity(pid_t >I<pid>B<, size_t >I<cpusetsize>B<,>\n"
3410 "B< cpu_set_t *>I<mask>B<);>\n"
3413 #: build/C/man2/sched_setaffinity.2:48
3416 "B<int sched_getaffinity(pid_t >I<pid>B<, size_t >I<cpusetsize>B<,>\n"
3417 "B< cpu_set_t *>I<mask>B<);>\n"
3419 "B<int sched_getaffinity(pid_t >I<pid>B<, size_t >I<cpusetsize>B<,>\n"
3420 "B< cpu_set_t *>I<mask>B<);>\n"
3423 #: build/C/man2/sched_setaffinity.2:63
3425 "A process's CPU affinity mask determines the set of CPUs on which it is "
3426 "eligible to run. On a multiprocessor system, setting the CPU affinity mask "
3427 "can be used to obtain performance benefits. For example, by dedicating one "
3428 "CPU to a particular process (i.e., setting the affinity mask of that process "
3429 "to specify a single CPU, and setting the affinity mask of all other "
3430 "processes to exclude that CPU), it is possible to ensure maximum execution "
3431 "speed for that process. Restricting a process to run on a single CPU also "
3432 "avoids the performance cost caused by the cache invalidation that occurs "
3433 "when a process ceases to execute on one CPU and then recommences execution "
3434 "on a different CPU."
3436 "プロセスの CPU affinity (親和度) マスクは、そのプロセスが 実行を許可されてい"
3437 "る CPU の集合を決定する。 マルチプロセッサ・システムでは、CPU affinity マスク"
3438 "を設定することで 性能上のメリットを得られる可能性がある。 例えば、特定のプロ"
3439 "セスを一つの CPU に括り付け (すなわち、そのプロセスの affinity マスクを一つ"
3440 "の CPU に設定し)、 他の全てのプロセスの affinity マスクからその CPU を除外す"
3441 "ることで、 確実にそのプロセスの実行速度を最大にすることができる。 また、ある"
3442 "プロセスの実行を一つの CPU に限定することで、 一つの CPU での実行を停止してか"
3443 "ら別の CPU で実行を再開するときに発生する キャッシュ無効化 (cache "
3444 "invalidation) による性能面の劣化を避けることもできる。"
3447 #: build/C/man2/sched_setaffinity.2:70
3449 "A CPU affinity mask is represented by the I<cpu_set_t> structure, a \"CPU set"
3450 "\", pointed to by I<mask>. A set of macros for manipulating CPU sets is "
3451 "described in B<CPU_SET>(3)."
3453 "CPU affinity マスクは「CPU の集合」を表す I<cpu_set_t> 構造体で表現され、 "
3454 "I<cpu_set_t> へのポインタ I<mask> で指定される。 CPU 集合を操作するためのマク"
3455 "ロ群については B<CPU_SET>(3) で記載されている。"
3458 #: build/C/man2/sched_setaffinity.2:85
3460 "B<sched_setaffinity>() sets the CPU affinity mask of the process whose ID "
3461 "is I<pid> to the value specified by I<mask>. If I<pid> is zero, then the "
3462 "calling process is used. The argument I<cpusetsize> is the length (in "
3463 "bytes) of the data pointed to by I<mask>. Normally this argument would be "
3464 "specified as I<sizeof(cpu_set_t)>."
3466 "B<sched_setaffinity>() は、プロセスID が I<pid> のプロセスの CPU affinity マ"
3467 "スクを I<mask> で指定された値に設定する。 I<pid> が 0 の場合、呼び出し元プロ"
3468 "セスが使われる。 I<cpusetsize> 引き数には I<mask> が指すデータの長さ (バイト"
3469 "単位) である。 通常は、この引き数には I<sizeof(cpu_set_t)> を指定すればよい。"
3472 #: build/C/man2/sched_setaffinity.2:92
3474 "If the process specified by I<pid> is not currently running on one of the "
3475 "CPUs specified in I<mask>, then that process is migrated to one of the CPUs "
3476 "specified in I<mask>."
3478 "I<pid> で指定されたプロセスが I<mask> で指定された CPU のいずれかで現在実行さ"
3479 "れていない場合、 そのプロセスは I<mask> で指定された CPU のいずれかに移動され"
3483 #: build/C/man2/sched_setaffinity.2:107
3485 "B<sched_getaffinity>() writes the affinity mask of the process whose ID is "
3486 "I<pid> into the I<cpu_set_t> structure pointed to by I<mask>. The "
3487 "I<cpusetsize> argument specifies the size (in bytes) of I<mask>. If I<pid> "
3488 "is zero, then the mask of the calling process is returned."
3490 "B<sched_getaffinity>() は、 プロセスID が I<pid> のプロセスの affinity マス"
3491 "クを I<mask> が指す I<cpu_set_t> 構造体に書き込む。 I<cpusetsize> 引き数には "
3492 "I<mask> の (バイト単位の) 大きさを指定する。"
3495 #: build/C/man2/sched_setaffinity.2:116
3497 "On success, B<sched_setaffinity>() and B<sched_getaffinity>() return 0. "
3498 "On error, -1 is returned, and I<errno> is set appropriately."
3500 "成功した場合、 B<sched_setaffinity>() と B<sched_getaffinity>() は 0 を返"
3501 "す。 エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
3504 #: build/C/man2/sched_setaffinity.2:120
3505 msgid "A supplied memory address was invalid."
3506 msgstr "指定されたメモリ番地が不正である。"
3509 #: build/C/man2/sched_setaffinity.2:128
3511 "The affinity bit mask I<mask> contains no processors that are currently "
3512 "physically on the system and permitted to the process according to any "
3513 "restrictions that may be imposed by the \"cpuset\" mechanism described in "
3516 "システム上に現在実際に存在し、かつ \"cpuset\" 機構が課す制限においてそのプロ"
3517 "セスに対して許可されている プロセッサが、 affinity ビットマスク I<mask> に含"
3518 "まれていない。 \"cpuset\" 機構については B<cpuset>(7) を参照。"
3521 #: build/C/man2/sched_setaffinity.2:135
3523 "(B<sched_getaffinity>() and, in kernels before 2.6.9, B<sched_setaffinity>"
3524 "()) I<cpusetsize> is smaller than the size of the affinity mask used by the "
3527 "(B<sched_getaffinity>() と、カーネル 2.6.9 以前の B<sched_setaffinity>()) "
3528 "I<cpusetsize> がカーネルで使われている affinity マスクのサイズより小さい。"
3531 #: build/C/man2/sched_setaffinity.2:145
3533 "(B<sched_setaffinity>()) The calling process does not have appropriate "
3534 "privileges. The caller needs an effective user ID equal to the real user ID "
3535 "or effective user ID of the process identified by I<pid>, or it must possess "
3536 "the B<CAP_SYS_NICE> capability."
3538 "(B<sched_setaffinity>()) 呼び出し元のプロセスに適切な特権がなかった。 呼び出"
3539 "し元は、実効ユーザ ID が I<pid> で識別されるプロセスの実ユーザ ID または実効"
3540 "ユーザ ID と同じであるか、 B<CAP_SYS_NICE> ケーパビリティ (capability) を持た"
3544 #: build/C/man2/sched_setaffinity.2:148 build/C/man2/sched_setparam.2:110
3545 #: build/C/man2/sched_setscheduler.2:444
3546 msgid "The process whose ID is I<pid> could not be found."
3547 msgstr "プロセス ID I<pid> のプロセスが見つからなかった。"
3550 #: build/C/man2/sched_setaffinity.2:159
3552 "The CPU affinity system calls were introduced in Linux kernel 2.5.8. The "
3553 "system call wrappers were introduced in glibc 2.3. Initially, the glibc "
3554 "interfaces included a I<cpusetsize> argument, typed as I<unsigned int>. In "
3555 "glibc 2.3.3, the I<cpusetsize> argument was removed, but was then restored "
3556 "in glibc 2.3.4, with type I<size_t>."
3558 "CPU affinity システムコールは Linux kernel 2.5.8 で導入された。 これらのシス"
3559 "テムコールのラッパー関数は glibc 2.3 で導入された。 最初は、glibc のインタ"
3560 "フェースには I<unsigned int> 型の I<cpusetsize> 引き数が入っていた。 glibc "
3561 "2.3.3 では I<cpusetsize> 引き数が削除されたが、glibc 2.3.4 で I<size_t> 型で"
3565 #: build/C/man2/sched_setaffinity.2:161
3566 msgid "These system calls are Linux-specific."
3567 msgstr "これらのシステムコールは Linux 固有である。"
3570 #: build/C/man2/sched_setaffinity.2:174
3572 "After a call to B<sched_setaffinity>(), the set of CPUs on which the process "
3573 "will actually run is the intersection of the set specified in the I<mask> "
3574 "argument and the set of CPUs actually present on the system. The system may "
3575 "further restrict the set of CPUs on which the process runs if the \"cpuset\" "
3576 "mechanism described in B<cpuset>(7) is being used. These restrictions on "
3577 "the actual set of CPUs on which the process will run are silently imposed by "
3580 "B<sched_setaffinity>() を呼び出した後は、プロセスが実際に実行される CPU の集"
3581 "合は、 I<mask> 引き数で指定された集合と、システム上に実際に存在する CPU の集"
3582 "合の 共通集合 (AND) となる。 \"cpuset\" 機構が使用されている場合には、プロセ"
3583 "スが動作する CPU 集合 に対してシステムはさらに制限を加えるかもしれない "
3584 "(\"cpuset\" 機構については B<cpuset>(7) を参照)。 プロセスが動作する実際の "
3585 "CPU 集合に対する制限はカーネルにより 暗黙のうちに適用される。"
3588 #: build/C/man2/sched_setaffinity.2:194
3590 "The affinity mask is actually a per-thread attribute that can be adjusted "
3591 "independently for each of the threads in a thread group. The value returned "
3592 "from a call to B<gettid>(2) can be passed in the argument I<pid>. "
3593 "Specifying I<pid> as 0 will set the attribute for the calling thread, and "
3594 "passing the value returned from a call to B<getpid>(2) will set the "
3595 "attribute for the main thread of the thread group. (If you are using the "
3596 "POSIX threads API, then use B<pthread_setaffinity_np>(3) instead of "
3597 "B<sched_setaffinity>().)"
3599 "実際には affinity マスクはスレッド単位の属性で、スレッドグループの 各スレッド"
3600 "単位に独立して調整することができる。 B<gettid>(2) コールからの返り値をこの"
3601 "コールの I<pid> 引き数として渡すことができる。 I<pid> に 0 を指定すると呼び出"
3602 "し元のスレッドの属性が設定され、 B<getpid>(2) コールからの返り値を I<pid> に"
3603 "指定するとスレッドグループのメインスレッドの属性が設定される (POSIX スレッド "
3604 "API を使用している場合、 B<sched_setaffinity>() の代わりに "
3605 "B<pthread_setaffinity_np>(3) を使用すること)。"
3608 #: build/C/man2/sched_setaffinity.2:200
3610 "A child created via B<fork>(2) inherits its parent's CPU affinity mask. "
3611 "The affinity mask is preserved across an B<execve>(2)."
3613 "B<fork>(2) 経由で生成された子プロセスは親プロセスの CPU affinity マスクを継"
3614 "承する。 affinity マスクは B<execve>(2) の前後で保存される。"
3617 #: build/C/man2/sched_setaffinity.2:214
3619 "This manual page describes the glibc interface for the CPU affinity calls. "
3620 "The actual system call interface is slightly different, with the I<mask> "
3621 "being typed as I<unsigned long\\ *>, reflecting the fact that the underlying "
3622 "implementation of CPU sets is a simple bit mask. On success, the raw "
3623 "B<sched_getaffinity>() system call returns the size (in bytes) of the "
3624 "I<cpumask_t> data type that is used internally by the kernel to represent "
3625 "the CPU set bit mask."
3627 "このマニュアルページでは CPU affinity コールの glibc インタフェースを 説明し"
3628 "ている。実際のシステムコール・インタフェースは少し違っており、 実際の実装で"
3629 "は CPU 集合は簡単なビットマスクであるという実状を反映し、 I<mask> の型が "
3630 "I<unsigned long\\ *> となっている。 成功時には、生の B<sched_getaffinity>() "
3631 "システムコール自身は I<cpumask_t> データ型の (バイト単位の) 大きさを返す。 "
3632 "I<cpumask_t> はカーネル内部で CPU 集合のビットマスクを表現するのに 使われてい"
3636 #: build/C/man2/sched_setaffinity.2:233
3638 "B<taskset>(1), B<clone>(2), B<getcpu>(2), B<getpriority>(2), B<gettid>(2), "
3639 "B<nice>(2), B<sched_get_priority_max>(2), B<sched_get_priority_min>(2), "
3640 "B<sched_getscheduler>(2), B<sched_setscheduler>(2), B<setpriority>(2), "
3641 "B<CPU_SET>(3), B<pthread_setaffinity_np>(3), B<sched_getcpu>(3), "
3642 "B<capabilities>(7), B<cpuset>(7)"
3644 "B<taskset>(1), B<clone>(2), B<getcpu>(2), B<getpriority>(2), B<gettid>(2), "
3645 "B<nice>(2), B<sched_get_priority_max>(2), B<sched_get_priority_min>(2), "
3646 "B<sched_getscheduler>(2), B<sched_setscheduler>(2), B<setpriority>(2), "
3647 "B<CPU_SET>(3), B<pthread_setaffinity_np>(3), B<sched_getcpu>(3), "
3648 "B<capabilities>(7), B<cpuset>(7)"
3651 #: build/C/man2/sched_setparam.2:30
3653 msgid "SCHED_SETPARAM"
3654 msgstr "SCHED_SETPARAM"
3657 #: build/C/man2/sched_setparam.2:30 build/C/man2/sched_setscheduler.2:46
3663 #: build/C/man2/sched_setparam.2:33
3664 msgid "sched_setparam, sched_getparam - set and get scheduling parameters"
3666 "sched_setparam, sched_getparam - スケジューリング・パラメータの設定と取得を行"
3670 #: build/C/man2/sched_setparam.2:38
3672 msgid "B<int sched_setparam(pid_t >I<pid>B<, const struct sched_param *>I<param>B<);>\n"
3673 msgstr "B<int sched_setparam(pid_t >I<pid>B<, const struct sched_param *>I<param>B<);>\n"
3676 #: build/C/man2/sched_setparam.2:40
3678 msgid "B<int sched_getparam(pid_t >I<pid>B<, struct sched_param *>I<param>B<);>\n"
3679 msgstr "B<int sched_getparam(pid_t >I<pid>B<, struct sched_param *>I<param>B<);>\n"
3682 #: build/C/man2/sched_setparam.2:46 build/C/man2/sched_setscheduler.2:65
3685 "B<struct sched_param {\n"
3687 " int >I<sched_priority>B<;\n"
3691 "B<struct sched_param {\n"
3693 " int >I<sched_priority>B<;\n"
3698 #: build/C/man2/sched_setparam.2:60
3700 "B<sched_setparam>() sets the scheduling parameters associated with the "
3701 "scheduling policy for the process identified by I<pid>. If I<pid> is zero, "
3702 "then the parameters of the calling process are set. The interpretation of "
3703 "the argument I<param> depends on the scheduling policy of the process "
3704 "identified by I<pid>. See B<sched_setscheduler>(2) for a description of "
3705 "the scheduling policies supported under Linux."
3707 "B<sched_setparam>() は I<pid> で指定されたプロセスのスケジューリング方針 "
3708 "(scheduling policy) に 関連するスケジューリング・パラメータを設定する。 "
3709 "I<pid> が 0 ならば、呼び出し元のプロセスのパラメータが設定される。 引き数 "
3710 "I<param> の解釈は、 I<pid> で指定されたプロセスのスケジューリング方針によって"
3711 "異なる。 Linux でサポートされているスケジューリング方針の説明は "
3712 "B<sched_setscheduler>(2) を参照のこと。"
3715 #: build/C/man2/sched_setparam.2:66
3717 "B<sched_getparam>() retrieves the scheduling parameters for the process "
3718 "identified by I<pid>. If I<pid> is zero, then the parameters of the calling "
3719 "process are retrieved."
3721 "B<sched_getparam>() は I<pid> で指定されたプロセスのスケジューリング・パラ"
3722 "メータを取得する。 I<pid> が 0 ならば、呼び出し元のプロセスのパラメータを取得"
3726 #: build/C/man2/sched_setparam.2:75
3728 "B<sched_setparam>() checks the validity of I<param> for the scheduling "
3729 "policy of the process. The value I<param-E<gt>sched_priority> must lie "
3730 "within the range given by B<sched_get_priority_min>(2) and "
3731 "B<sched_get_priority_max>(2)."
3733 "B<sched_setparam>() はプロセスのスケジューリング方針における I<param> の妥当"
3734 "性をチェックする。 I<param-E<gt>sched_priority> の値は "
3735 "B<sched_get_priority_min>(2) と B<sched_get_priority_max>(2) の範囲に入って"
3739 #: build/C/man2/sched_setparam.2:79
3741 "For a discussion of the privileges and resource limits related to scheduling "
3742 "priority and policy, see B<sched_setscheduler>(2)."
3744 "スケジューリングの優先度と方針に関連する特権とリソース制限の 議論に関しては "
3745 "B<sched_setscheduler>(2) を参照のこと。"
3748 #: build/C/man2/sched_setparam.2:87
3750 "POSIX systems on which B<sched_setparam>() and B<sched_getparam>() are "
3751 "available define B<_POSIX_PRIORITY_SCHEDULING> in I<E<lt>unistd.hE<gt>>."
3753 "B<sched_setparam>() と B<sched_getparam>() が使用できる POSIX システムで"
3754 "は、 I<E<lt>unistd.hE<gt>> に B<_POSIX_PRIORITY_SCHEDULING> が定義されてい"
3758 #: build/C/man2/sched_setparam.2:96
3760 "On success, B<sched_setparam>() and B<sched_getparam>() return 0. On "
3761 "error, -1 is returned, and I<errno> is set appropriately."
3763 "成功した場合は B<sched_setparam>() と B<sched_getparam>() は 0 を返す。 エ"
3764 "ラーの場合は -1 が返され、 I<errno> が適切に設定される。"
3767 #: build/C/man2/sched_setparam.2:101
3769 "The argument I<param> does not make sense for the current scheduling policy."
3770 msgstr "引き数 I<param> が現在のスケジューリング方針においては 無意味である。"
3773 #: build/C/man2/sched_setparam.2:107
3775 "The calling process does not have appropriate privileges (Linux: does not "
3776 "have the B<CAP_SYS_NICE> capability)."
3778 "呼び出し元のプロセスが適切な特権を持っていない (Linux では、 B<CAP_SYS_NICE> "
3782 #: build/C/man2/sched_setparam.2:118
3784 "Scheduling parameters are in fact per-thread attributes on Linux; see "
3785 "B<sched_setscheduler>(2)."
3787 "Linux では、スケジューリングパラメータは実際にはスレッド単位の属性である。 "
3788 "B<sched_setscheduler>(2) 参照。"
3791 #: build/C/man2/sched_setparam.2:131
3793 "B<getpriority>(2), B<nice>(2), B<sched_get_priority_max>(2), "
3794 "B<sched_get_priority_min>(2), B<sched_getaffinity>(2), B<sched_getscheduler>"
3795 "(2), B<sched_setaffinity>(2), B<sched_setscheduler>(2), B<setpriority>(2), "
3796 "B<capabilities>(7)"
3798 "B<getpriority>(2), B<nice>(2), B<sched_get_priority_max>(2), "
3799 "B<sched_get_priority_min>(2), B<sched_getaffinity>(2), B<sched_getscheduler>"
3800 "(2), B<sched_setaffinity>(2), B<sched_setscheduler>(2), B<setpriority>(2), "
3801 "B<capabilities>(7)"
3804 #: build/C/man2/sched_setscheduler.2:46
3806 msgid "SCHED_SETSCHEDULER"
3807 msgstr "SCHED_SETSCHEDULER"
3810 #: build/C/man2/sched_setscheduler.2:50
3812 "sched_setscheduler, sched_getscheduler - set and get scheduling policy/"
3815 "sched_setscheduler, sched_getscheduler - スケジューリング・ポリシーとパラメー"
3819 #: build/C/man2/sched_setscheduler.2:55
3821 msgid "B<int sched_setscheduler(pid_t >I<pid>B<, int >I<policy>B<,>\n"
3822 msgstr "B<int sched_setscheduler(pid_t >I<pid>B<, int >I<policy>B<,>\n"
3825 #: build/C/man2/sched_setscheduler.2:57
3827 msgid "B< const struct sched_param *>I<param>B<);>\n"
3828 msgstr "B< const struct sched_param *>I<param>B<);>\n"
3831 #: build/C/man2/sched_setscheduler.2:59
3833 msgid "B<int sched_getscheduler(pid_t >I<pid>B<);>\n"
3834 msgstr "B<int sched_getscheduler(pid_t >I<pid>B<);>\n"
3837 #: build/C/man2/sched_setscheduler.2:76
3839 "B<sched_setscheduler>() sets both the scheduling policy and the associated "
3840 "parameters for the process whose ID is specified in I<pid>. If I<pid> "
3841 "equals zero, the scheduling policy and parameters of the calling process "
3842 "will be set. The interpretation of the argument I<param> depends on the "
3843 "selected policy. Currently, Linux supports the following \"normal\" (i.e., "
3844 "non-real-time) scheduling policies:"
3846 "B<sched_setscheduler>() は I<pid> で指定された ID を持つプロセスのスケジュー"
3847 "リング・ポリシーや それに関連するパラメータを設定する。I<pid> が 0 の場合は "
3848 "呼び出したプロセスのスケジューリング・ポリシーとパラメータが設定される。 引き"
3849 "数 I<param> の解釈は選択されたポリシーによる。 現在のところ、Linux では 以下"
3850 "に示す「通常」(リアルタイムでない) スケジューリング・ポリシーが サポートされ"
3854 #: build/C/man2/sched_setscheduler.2:76
3856 msgid "B<SCHED_OTHER>"
3857 msgstr "B<SCHED_OTHER>"
3859 #. In the 2.6 kernel sources, SCHED_OTHER is actually called
3862 #: build/C/man2/sched_setscheduler.2:81
3863 msgid "the standard round-robin time-sharing policy;"
3864 msgstr "標準の、ラウンドロビンによる時分割型のスケジューリング・ポリシー。"
3867 #: build/C/man2/sched_setscheduler.2:81
3869 msgid "B<SCHED_BATCH>"
3870 msgstr "B<SCHED_BATCH>"
3873 #: build/C/man2/sched_setscheduler.2:84
3874 msgid "for \"batch\" style execution of processes; and"
3875 msgstr "「バッチ」形式でのプロセスの実行用。"
3878 #: build/C/man2/sched_setscheduler.2:84
3880 msgid "B<SCHED_IDLE>"
3881 msgstr "B<SCHED_IDLE>"
3884 #: build/C/man2/sched_setscheduler.2:89
3885 msgid "for running I<very> low priority background jobs."
3886 msgstr "「非常に」低い優先度で動作するバックグラウンド・ジョブ用。"
3889 #: build/C/man2/sched_setscheduler.2:93
3891 "The following \"real-time\" policies are also supported, for special time-"
3892 "critical applications that need precise control over the way in which "
3893 "runnable processes are selected for execution:"
3895 "どの実行可能プロセスを選択するかについて、より正確な制御を必要とする 時間の制"
3896 "約が厳しい特別なアプリケーション用として、 以下の「リアルタイム」ポリシーもサ"
3900 #: build/C/man2/sched_setscheduler.2:93
3902 msgid "B<SCHED_FIFO>"
3903 msgstr "B<SCHED_FIFO>"
3906 #: build/C/man2/sched_setscheduler.2:96
3907 msgid "a first-in, first-out policy; and"
3908 msgstr "ファーストイン、ファーストアウト型のポリシー。"
3911 #: build/C/man2/sched_setscheduler.2:96
3914 msgstr "B<SCHED_RR>"
3917 #: build/C/man2/sched_setscheduler.2:99
3918 msgid "a round-robin policy."
3919 msgstr "ラウンドロビン型のポリシー。"
3922 #: build/C/man2/sched_setscheduler.2:101
3923 msgid "The semantics of each of these policies are detailed below."
3924 msgstr "これらのポリシーのそれぞれの動作については以下で説明する。"
3927 #: build/C/man2/sched_setscheduler.2:108
3929 "B<sched_getscheduler>() queries the scheduling policy currently applied to "
3930 "the process identified by I<pid>. If I<pid> equals zero, the policy of the "
3931 "calling process will be retrieved."
3933 "B<sched_getscheduler>() は I<pid> で識別されるプロセスに現在適用されている "
3934 "スケジューリング・ポリシーを尋ねる。I<pid> が 0 ならば、呼び出した プロセス自"
3935 "身のスケジューリング・ポリシーが返される。"
3938 #: build/C/man2/sched_setscheduler.2:108
3940 msgid "Scheduling policies"
3941 msgstr "スケジューリング・ポリシー (scheduling policy)"
3944 #: build/C/man2/sched_setscheduler.2:117
3946 "The scheduler is the kernel component that decides which runnable process "
3947 "will be executed by the CPU next. Each process has an associated scheduling "
3948 "policy and a I<static> scheduling priority, I<sched_priority>; these are the "
3949 "settings that are modified by B<sched_setscheduler>(). The scheduler makes "
3950 "it decisions based on knowledge of the scheduling policy and static priority "
3951 "of all processes on the system."
3953 "スケジューラ (scheduler) とはカーネルの構成要素で、 次に CPU で実行される実行"
3954 "可能なプロセスを決定するものである。 各々のプロセスには、スケジューリング・ポ"
3955 "リシーと 「静的」なスケジューリング優先度 I<sched_priority> が対応付けられ、 "
3956 "これらの設定は B<sched_setscheduler>() で変更できる。 スケジューラは、システ"
3957 "ム上の全プロセスのスケジューリング・ポリシーと 静的優先度に関する知識に基づい"
3961 #: build/C/man2/sched_setscheduler.2:122
3963 "For processes scheduled under one of the normal scheduling policies "
3964 "(B<SCHED_OTHER>, B<SCHED_IDLE>, B<SCHED_BATCH>), I<sched_priority> is not "
3965 "used in scheduling decisions (it must be specified as 0)."
3967 "通常のスケジューリング・ポリシー (B<SCHED_OTHER>, B<SCHED_IDLE>, "
3968 "B<SCHED_BATCH>) の下でスケジューリングされるプロセスでは、 "
3969 "I<sched_priority> はスケジューリングの決定に使用されない (I<sched_priority> "
3970 "には 0 を指定しなければならない)。"
3973 #: build/C/man2/sched_setscheduler.2:136
3975 "Processes scheduled under one of the real-time policies (B<SCHED_FIFO>, "
3976 "B<SCHED_RR>) have a I<sched_priority> value in the range 1 (low) to 99 "
3977 "(high). (As the numbers imply, real-time processes always have higher "
3978 "priority than normal processes.) Note well: POSIX.1-2001 requires an "
3979 "implementation to support only a minimum 32 distinct priority levels for the "
3980 "real-time policies, and some systems supply just this minimum. Portable "
3981 "programs should use B<sched_get_priority_min>(2) and "
3982 "B<sched_get_priority_max>(2) to find the range of priorities supported for "
3983 "a particular policy."
3985 "リアルタイム・スケジューリング・ポリシー (B<SCHED_FIFO>, B<SCHED_RR>) の下で"
3986 "スケジューリングされるプロセスは、 I<sched_priority> の値は 1 (最低) から 99 "
3987 "(最高) の範囲となる (数字から分かるように、リアルタイム・プロセスは常に通常の"
3988 "プロセスよりも 高い優先度を持つ)。 ここで注意すべきなのは、POSIX.1-2001 が要"
3989 "求しているのは、 リアルタイム・ポリシーの実装において最低 32 種類の異なる優先"
3990 "度レベルが サポートされることだけであり、いくつかのシステムではこの最低限の数"
3991 "の 優先度しか提供されていない、ということである。 移植性が必要なプログラムで"
3992 "は、 B<sched_get_priority_min>(2) と B<sched_get_priority_max>(2) を使っ"
3993 "て、あるポリシーがサポートする優先度の範囲を調べるべきである。"
3996 #: build/C/man2/sched_setscheduler.2:142
3998 "Conceptually, the scheduler maintains a list of runnable processes for each "
3999 "possible I<sched_priority> value. In order to determine which process runs "
4000 "next, the scheduler looks for the nonempty list with the highest static "
4001 "priority and selects the process at the head of this list."
4003 "概念としては、 スケジューラはその I<sched_priority> の値それぞれに対して 実行"
4004 "可能なプロセスのリストを管理している。 どのプロセスを次に実行するかを決定する"
4005 "ために、 スケジューラは静的優先度の最も高い空でないリストを探して、 そのリス"
4009 #: build/C/man2/sched_setscheduler.2:146
4011 "A process's scheduling policy determines where it will be inserted into the "
4012 "list of processes with equal static priority and how it will move inside "
4015 "各プロセスのスケジューリング・ポリシーは、 そのプロセスが同じ静的優先度を持つ"
4016 "プロセスのリストの中のどこに挿入され、 このリストの中をどのように移動するかを"
4020 #: build/C/man2/sched_setscheduler.2:154
4022 "All scheduling is preemptive: if a process with a higher static priority "
4023 "becomes ready to run, the currently running process will be preempted and "
4024 "returned to the wait list for its static priority level. The scheduling "
4025 "policy determines the ordering only within the list of runnable processes "
4026 "with equal static priority."
4028 "全てのスケジューリングはプリエンプティブ (preemptive) である: より高い優先度"
4029 "のプロセスが実行可能になると、現在実行中のプロセスは実行権を 取り上げられ "
4030 "(preempted)、そのプロセスの静的優先度レベルの待ちリストに 戻される。スケ"
4031 "ジューリング・ポリシーは同じ静的優先度を持つ実行可能な プロセスのリストの中で"
4035 #: build/C/man2/sched_setscheduler.2:154
4037 msgid "SCHED_FIFO: First in-first out scheduling"
4038 msgstr "SCHED_FIFO: ファーストイン・ファーストアウト・スケジューリング"
4041 #: build/C/man2/sched_setscheduler.2:163
4043 "B<SCHED_FIFO> can be used only with static priorities higher than 0, which "
4044 "means that when a B<SCHED_FIFO> processes becomes runnable, it will always "
4045 "immediately preempt any currently running B<SCHED_OTHER>, B<SCHED_BATCH>, or "
4046 "B<SCHED_IDLE> process. B<SCHED_FIFO> is a simple scheduling algorithm "
4047 "without time slicing. For processes scheduled under the B<SCHED_FIFO> "
4048 "policy, the following rules apply:"
4050 "B<SCHED_FIFO> は 0 より大きな静的優先度でのみ使用できる。このポリシーでは、 "
4051 "B<SCHED_FIFO> プロセスが実行可能になった場合、 そのポリシーが "
4052 "B<SCHED_OTHER>、 B<SCHED_BATCH>、 B<SCHED_IDLE> の 現在実行中のプロセスは直ち"
4053 "に実行権を取り上げられる。 B<SCHED_FIFO> は時分割のない単純なスケジューリン"
4054 "グ・アルゴリズムである。 B<SCHED_FIFO> ポリシーでスケジューリングされているプ"
4055 "ロセスには以下の ルールが適用される:"
4058 #: build/C/man2/sched_setscheduler.2:163 build/C/man2/sched_setscheduler.2:168
4059 #: build/C/man2/sched_setscheduler.2:171 build/C/man2/sched_setscheduler.2:185
4060 #: build/C/man2/sched_setscheduler.2:287 build/C/man2/sched_setscheduler.2:295
4061 #: build/C/man2/sched_setscheduler.2:336 build/C/man2/sched_setscheduler.2:344
4062 #: build/C/man2/sched_setscheduler.2:349 build/C/man2/sched_setscheduler.2:354
4068 #: build/C/man2/sched_setscheduler.2:168
4070 "A B<SCHED_FIFO> process that has been preempted by another process of higher "
4071 "priority will stay at the head of the list for its priority and will resume "
4072 "execution as soon as all processes of higher priority are blocked again."
4074 "より高い優先度の他のプロセスによって取って代わられた B<SCHED_FIFO> プロセスは"
4075 "その優先度のリストの先頭に留まり続け、 より高い優先度のプロセス全てが停止 "
4076 "(block) した場合に実行を再開する。"
4079 #: build/C/man2/sched_setscheduler.2:171
4081 "When a B<SCHED_FIFO> process becomes runnable, it will be inserted at the "
4082 "end of the list for its priority."
4084 "B<SCHED_FIFO> プロセスが実行可能になった時、その優先度のリストの最後 に挿入さ"
4087 #. In 2.2.x and 2.4.x, the process is placed at the front of the queue
4088 #. In 2.0.x, the Right Thing happened: the process went to the back -- MTK
4090 #: build/C/man2/sched_setscheduler.2:185
4092 "A call to B<sched_setscheduler>() or B<sched_setparam>(2) will put the "
4093 "B<SCHED_FIFO> (or B<SCHED_RR>) process identified by I<pid> at the start of "
4094 "the list if it was runnable. As a consequence, it may preempt the currently "
4095 "running process if it has the same priority. (POSIX.1-2001 specifies that "
4096 "the process should go to the end of the list.)"
4098 "B<sched_setscheduler>() や B<sched_setparam>(2) は I<pid> で指定された "
4099 "B<SCHED_FIFO> (または B<SCHED_RR>) プロセスが 実行可能な場合、リストの最初に"
4100 "置く。 結果として、もし優先度が同じだった場合、 現在実行中のプロセスに先んじ"
4101 "るかもしれない。 (POSIX.1-2001 ではプロセスはリストの最後に行くべきと規定され"
4105 #: build/C/man2/sched_setscheduler.2:189
4107 "A process calling B<sched_yield>(2) will be put at the end of the list."
4108 msgstr "B<sched_yield>(2) を呼び出したプロセスはリストの最後に置かれる。"
4111 #: build/C/man2/sched_setscheduler.2:193
4113 "No other events will move a process scheduled under the B<SCHED_FIFO> policy "
4114 "in the wait list of runnable processes with equal static priority."
4116 "その他のイベントによって B<SCHED_FIFO> ポリシーで スケジューリングされるプロ"
4117 "セスが同じ優先度の実行可能な プロセスの待ちリストの中を移動することはない。"
4120 #: build/C/man2/sched_setscheduler.2:198
4122 "A B<SCHED_FIFO> process runs until either it is blocked by an I/O request, "
4123 "it is preempted by a higher priority process, or it calls B<sched_yield>(2)."
4125 "B<SCHED_FIFO> プロセスは I/O 要求によって停止するか、 より高い優先度のプロセ"
4126 "スによって置きかえられるか、 B<sched_yield>(2) を呼び出すまで実行を続ける。"
4129 #: build/C/man2/sched_setscheduler.2:198
4131 msgid "SCHED_RR: Round-robin scheduling"
4132 msgstr "SCHED_RR: ラウンドロビン (round-robin)・スケジューリング"
4134 #. On Linux 2.4, the length of the RR interval is influenced
4135 #. by the process nice value -- MTK
4137 #: build/C/man2/sched_setscheduler.2:217
4139 "B<SCHED_RR> is a simple enhancement of B<SCHED_FIFO>. Everything described "
4140 "above for B<SCHED_FIFO> also applies to B<SCHED_RR>, except that each "
4141 "process is allowed to run only for a maximum time quantum. If a B<SCHED_RR> "
4142 "process has been running for a time period equal to or longer than the time "
4143 "quantum, it will be put at the end of the list for its priority. A "
4144 "B<SCHED_RR> process that has been preempted by a higher priority process and "
4145 "subsequently resumes execution as a running process will complete the "
4146 "unexpired portion of its round-robin time quantum. The length of the time "
4147 "quantum can be retrieved using B<sched_rr_get_interval>(2)."
4149 "B<SCHED_RR> は B<SCHED_FIFO> の単純な拡張である。 上述された\n"
4150 "B<SCHED_FIFO> に関する記述は全て B<SCHED_RR> に 適用できる。異なるのは\n"
4151 "それぞれのプロセスは最大時間単位までしか実行できない ということである。\n"
4152 "B<SCHED_RR> プロセスが時間単位と同じかそれより 長い時間実行されると、\n"
4153 "その優先度のリストの最後に置かれる。 より高い優先度のプロセスによって\n"
4154 "置きかえられ、その後実行を再開した B<SCHED_RR> プロセスは、そのラウンド\n"
4155 "ロビン時間単位を完全に使い切る まで実行される。その時間単位の長さは\n"
4156 "B<sched_rr_get_interval>(2) を使って取得できる。"
4159 #: build/C/man2/sched_setscheduler.2:217
4161 msgid "SCHED_OTHER: Default Linux time-sharing scheduling"
4162 msgstr "SCHED_OTHER: Linux のデフォルトの時分割スケジューリング"
4165 #: build/C/man2/sched_setscheduler.2:233
4167 "B<SCHED_OTHER> can be used at only static priority 0. B<SCHED_OTHER> is the "
4168 "standard Linux time-sharing scheduler that is intended for all processes "
4169 "that do not require the special real-time mechanisms. The process to run is "
4170 "chosen from the static priority 0 list based on a I<dynamic> priority that "
4171 "is determined only inside this list. The dynamic priority is based on the "
4172 "nice value (set by B<nice>(2) or B<setpriority>(2)) and increased for each "
4173 "time quantum the process is ready to run, but denied to run by the "
4174 "scheduler. This ensures fair progress among all B<SCHED_OTHER> processes."
4176 "B<SCHED_OTHER> は静的優先度 0 でのみ使用できる。 B<SCHED_OTHER> は Linux 標準"
4177 "の時分割スケジューラで、 特別なリアルタイム機構を必要としていない全てのプロセ"
4178 "スで使用される。 実行するプロセスは、静的優先度 0 のリストから、このリストの"
4179 "中だけで 決定される「動的な」優先度 (dynamic priority) に基いて決定される。 "
4180 "動的な優先度は (B<nice>(2) や B<setpriority>(2) により設定される) nice 値に"
4181 "基づいて決定されるもので、 単位時間毎に、プロセスが実行可能だが、スケジューラ"
4182 "により実行が拒否された 場合にインクリメントされる。 これにより、全ての "
4183 "B<SCHED_OTHER> プロセスでの公平性が保証される。"
4186 #: build/C/man2/sched_setscheduler.2:233
4188 msgid "SCHED_BATCH: Scheduling batch processes"
4189 msgstr "SCHED_BATCH: バッチプロセスのスケジューリング"
4192 #: build/C/man2/sched_setscheduler.2:245
4194 "(Since Linux 2.6.16.) B<SCHED_BATCH> can be used only at static priority "
4195 "0. This policy is similar to B<SCHED_OTHER> in that it schedules the "
4196 "process according to its dynamic priority (based on the nice value). The "
4197 "difference is that this policy will cause the scheduler to always assume "
4198 "that the process is CPU-intensive. Consequently, the scheduler will apply a "
4199 "small scheduling penalty with respect to wakeup behaviour, so that this "
4200 "process is mildly disfavored in scheduling decisions."
4202 "(Linux 2.6.16 以降) B<SCHED_BATCH> は静的優先度 0 でのみ使用できる。 このポ"
4203 "リシーは (nice 値に基づく) 動的な優先度にしたがってプロセスの スケジューリン"
4204 "グが行われるという点で、B<SCHED_OTHER> に似ている。 異なるのは、このポリシー"
4205 "では、プロセスが常に CPU に負荷のかかる (CPU-intensive) 処理を行うと、スケ"
4206 "ジューラが仮定する点である。 スケジューラはプロセスを呼び起こす毎にそのプロセ"
4207 "スにスケジューリング上の ペナルティを少し課し、その結果、このプロセスはスケ"
4208 "ジューリングの決定で 若干冷遇されるようになる。"
4210 #. The following paragraph is drawn largely from the text that
4211 #. accompanied Ingo Molnar's patch for the implementation of
4214 #: build/C/man2/sched_setscheduler.2:254
4216 "This policy is useful for workloads that are noninteractive, but do not want "
4217 "to lower their nice value, and for workloads that want a deterministic "
4218 "scheduling policy without interactivity causing extra preemptions (between "
4219 "the workload's tasks)."
4221 "このポリシーは、非対話的な処理だがその nice 値を下げたくない処理や、 (処理の"
4222 "タスク間で) 余計なタスクの置き換えの原因とある対話的な処理なしで 確定的な "
4223 "(deterministic) スケジューリング・ポリシーを適用したい処理に 対して有効であ"
4227 #: build/C/man2/sched_setscheduler.2:254
4229 msgid "SCHED_IDLE: Scheduling very low priority jobs"
4230 msgstr "SCHED_IDLE: 非常に優先度の低いジョブのスケジューリング"
4233 #: build/C/man2/sched_setscheduler.2:258
4235 "(Since Linux 2.6.23.) B<SCHED_IDLE> can be used only at static priority 0; "
4236 "the process nice value has no influence for this policy."
4238 "(Linux 2.6.23 以降) B<SCHED_IDLE> は静的優先度 0 でのみ使用できる。 このポリ"
4239 "シーではプロセスの nice 値はスケジューリングに影響を与えない。"
4242 #: build/C/man2/sched_setscheduler.2:266
4244 "This policy is intended for running jobs at extremely low priority (lower "
4245 "even than a +19 nice value with the B<SCHED_OTHER> or B<SCHED_BATCH> "
4248 "非常に低い優先度でのジョブの実行を目的としたものである (非常に低い優先度と"
4249 "は、ポリシー B<SCHED_OTHER> か B<SCHED_BATCH> での nice 値 +19 よりさらに低い"
4253 #: build/C/man2/sched_setscheduler.2:266
4255 msgid "Resetting scheduling policy for child processes"
4256 msgstr "子プロセスでのスケジューリング・ポリシーのリセット"
4259 #: build/C/man2/sched_setscheduler.2:282
4261 "Since Linux 2.6.32, the B<SCHED_RESET_ON_FORK> flag can be ORed in I<policy> "
4262 "when calling B<sched_setscheduler>(). As a result of including this flag, "
4263 "children created by B<fork>(2) do not inherit privileged scheduling "
4264 "policies. This feature is intended for media-playback applications, and can "
4265 "be used to prevent applications evading the B<RLIMIT_RTTIME> resource limit "
4266 "(see B<getrlimit>(2)) by creating multiple child processes."
4268 "Linux 2.6.32 以降では、 B<sched_setscheduler>() を呼び出す際に I<policy> に "
4269 "B<SCHED_RESET_ON_FORK> フラグを OR で指定できる。このフラグが指定されると、 "
4270 "B<fork>(2) で作成された子プロセスは特権が必要なスケジューリング・ポリシーを継"
4271 "承しない。この機能はメディア再生を行うアプリケーションを想定して作られ、この"
4272 "機能を使うことで、アプリケーションが複数の子プロセスを作成することで "
4273 "B<RLIMIT_RTTIME> リソース上限 (B<getrlimit>(2) 参照) を回避するのを防ぐことが"
4277 #: build/C/man2/sched_setscheduler.2:287
4279 "More precisely, if the B<SCHED_RESET_ON_FORK> flag is specified, the "
4280 "following rules apply for subsequently created children:"
4282 "より正確には、 B<SCHED_RESET_ON_FORK> フラグが指定された場合、それ以降に作成"
4283 "される子プロセスに以下のルールが適用される。"
4286 #: build/C/man2/sched_setscheduler.2:295
4288 "If the calling process has a scheduling policy of B<SCHED_FIFO> or "
4289 "B<SCHED_RR>, the policy is reset to B<SCHED_OTHER> in child processes."
4291 "呼び出したプロセスのスケジューリング・ポリシーが B<SCHED_FIFO> か "
4292 "B<SCHED_RR> の場合、子プロセスのポリシーは B<SCHED_OTHER> にリセットされる。"
4295 #: build/C/man2/sched_setscheduler.2:298
4297 "If the calling process has a negative nice value, the nice value is reset to "
4298 "zero in child processes."
4300 "子プロセスが負の nice 値を持っている場合、子プロセスの nice 値は 0 にリセット"
4304 #: build/C/man2/sched_setscheduler.2:307
4306 "After the B<SCHED_RESET_ON_FORK> flag has been enabled, it can be reset only "
4307 "if the process has the B<CAP_SYS_NICE> capability. This flag is disabled in "
4308 "child processes created by B<fork>(2)."
4310 "一度 B<SCHED_RESET_ON_FORK> フラグが有効にされた後は、このフラグをリセットで"
4311 "きるのは、プロセスが B<CAP_SYS_NICE> ケーパビリティを持つ場合だけである。この"
4312 "フラグは B<fork>(2) で作成された子プロセスでは無効になる。"
4315 #: build/C/man2/sched_setscheduler.2:313
4317 "The B<SCHED_RESET_ON_FORK> flag is visible in the policy value returned by "
4318 "B<sched_getscheduler>()"
4320 "B<SCHED_RESET_ON_FORK> フラグは、 B<sched_getscheduler>() が返すポリシー値で"
4324 #: build/C/man2/sched_setscheduler.2:313
4326 msgid "Privileges and resource limits"
4330 #: build/C/man2/sched_setscheduler.2:326
4332 "In Linux kernels before 2.6.12, only privileged (B<CAP_SYS_NICE>) processes "
4333 "can set a nonzero static priority (i.e., set a real-time scheduling "
4334 "policy). The only change that an unprivileged process can make is to set "
4335 "the B<SCHED_OTHER> policy, and this can be done only if the effective user "
4336 "ID of the caller of B<sched_setscheduler>() matches the real or effective "
4337 "user ID of the target process (i.e., the process specified by I<pid>) whose "
4338 "policy is being changed."
4340 "2.6.12 より前のバージョンの Linux カーネルでは、 特権プロセス "
4341 "(B<CAP_SYS_NICE> ケーパビリティを持つプロセス) だけが 0 以外の静的優先度を設"
4342 "定する (すなわち、リアルタイム・スケジューリング・ポリシーを設定する) ことが"
4343 "できる。 非特権プロセスができる変更は B<SCHED_OTHER> ポリシーを設定することだ"
4344 "けであり、さらにこの変更を行えるのは B<sched_setscheduler>() の呼び出し元の"
4345 "実効ユーザ ID がポリシーの変更対象プロセス (I<pid> で指定されたプロセス) の実"
4346 "ユーザ ID か実効ユーザ ID と 一致する場合だけである。"
4349 #: build/C/man2/sched_setscheduler.2:336
4351 "Since Linux 2.6.12, the B<RLIMIT_RTPRIO> resource limit defines a ceiling on "
4352 "an unprivileged process's static priority for the B<SCHED_RR> and "
4353 "B<SCHED_FIFO> policies. The rules for changing scheduling policy and "
4354 "priority are as follows:"
4356 "Linux 2.6.12 以降では、リソース制限 B<RLIMIT_RTPRIO> が定義されており、 スケ"
4357 "ジューリング・ポリシーが B<SCHED_RR> と B<SCHED_FIFO> の場合の、非特権プロセ"
4358 "スの静的優先度の上限を定めている。 スケジューリング・ポリシーと優先度を変更す"
4362 #: build/C/man2/sched_setscheduler.2:344
4364 "If an unprivileged process has a nonzero B<RLIMIT_RTPRIO> soft limit, then "
4365 "it can change its scheduling policy and priority, subject to the restriction "
4366 "that the priority cannot be set to a value higher than the maximum of its "
4367 "current priority and its B<RLIMIT_RTPRIO> soft limit."
4369 "非特権プロセスに 0 以外の B<RLIMIT_RTPRIO> ソフト・リミットが設定されている場"
4370 "合、 非特権プロセスはそのプロセスのスケジューリング・ポリシーと優先度を 変更"
4371 "できるが、優先度を現在の自身の優先度と B<RLIMIT_RTPRIO> ソフト・リミットの大"
4372 "きい方よりも高い値に設定できないという制限が課される。"
4375 #: build/C/man2/sched_setscheduler.2:349
4377 "If the B<RLIMIT_RTPRIO> soft limit is 0, then the only permitted changes are "
4378 "to lower the priority, or to switch to a non-real-time policy."
4380 "B<RLIMIT_RTPRIO> ソフト・リミットが 0 の場合、優先度を下げるか、 リアルタイム"
4381 "でないポリシーへ切り替えるかの変更だけが許可される。"
4384 #: build/C/man2/sched_setscheduler.2:354
4386 "Subject to the same rules, another unprivileged process can also make these "
4387 "changes, as long as the effective user ID of the process making the change "
4388 "matches the real or effective user ID of the target process."
4390 "ある非特権プロセスが別のプロセスに対してこれらの変更を行う際にも、 同じルール"
4391 "が適用される。変更を行えるのは、変更を行おうとするプロセス の実効ユーザ ID が"
4392 "変更対象のプロセスの実ユーザ ID か実効ユーザ ID と 一致している場合に限られ"
4395 #. commit c02aa73b1d18e43cfd79c2f193b225e84ca497c8
4397 #: build/C/man2/sched_setscheduler.2:372
4399 "Special rules apply for the B<SCHED_IDLE>. In Linux kernels before 2.6.39, "
4400 "an unprivileged process operating under this policy cannot change its "
4401 "policy, regardless of the value of its B<RLIMIT_RTPRIO> resource limit. In "
4402 "Linux kernels since 2.6.39, an unprivileged process can switch to either the "
4403 "B<SCHED_BATCH> or the B<SCHED_NORMAL> policy so long as its nice value falls "
4404 "within the range permitted by its B<RLIMIT_NICE> resource limit (see "
4407 "B<SCHED_IDLE> の場合には特別なルールが適用される。 2.6.39 より前の Linux カー"
4408 "ネルでは、このポリシーで動作する非特権プロセスは、 B<RLIMIT_RTPRIO> リソース"
4409 "上限の値に関わらず、自分のポリシーを変更することができない。 2.6.39 以降の "
4410 "Linux カーネルでは、非特権プロセスは、自分の nice 値が B<RLIMIT_NICE> リソー"
4411 "ス上限 (B<getrlimit>(2) 参照) で許可された範囲である限りは、自分のスケジュー"
4412 "リング・ポリシーを B<SCHED_BATCH> か B<SCHED_NORMAL> ポリシーに切り替えること"
4416 #: build/C/man2/sched_setscheduler.2:383
4418 "Privileged (B<CAP_SYS_NICE>) processes ignore the B<RLIMIT_RTPRIO> limit; "
4419 "as with older kernels, they can make arbitrary changes to scheduling policy "
4420 "and priority. See B<getrlimit>(2) for further information on "
4423 "特権プロセス (B<CAP_SYS_NICE> ケーパビリティを持つプロセス) の場合、 "
4424 "B<RLIMIT_RTPRIO> の制限は無視される; 古いカーネルと同じように、スケジューリン"
4425 "グ・ポリシーと優先度に対し 任意の変更を行うことができる。 B<RLIMIT_RTPRIO> に"
4426 "関するもっと詳しい情報は B<getrlimit>(2) を参照のこと。"
4429 #: build/C/man2/sched_setscheduler.2:383
4431 msgid "Response time"
4432 msgstr "応答時間 (response time)"
4435 #. .BR request_irq (9).
4437 #: build/C/man2/sched_setscheduler.2:391
4439 "A blocked high priority process waiting for the I/O has a certain response "
4440 "time before it is scheduled again. The device driver writer can greatly "
4441 "reduce this response time by using a \"slow interrupt\" interrupt handler."
4443 "I/O 待ちで停止したより高い優先度のプロセスは再びスケジューリングされる 前にい"
4444 "くらかの応答時間がかかる。デバイス・ドライバーを書く場合には \"slow interrupt"
4445 "\" 割り込みハンドラーを使用することで この応答時間を劇的に減少させることがで"
4449 #: build/C/man2/sched_setscheduler.2:391
4451 msgid "Miscellaneous"
4455 #: build/C/man2/sched_setscheduler.2:396
4457 "Child processes inherit the scheduling policy and parameters across a B<fork>"
4458 "(2). The scheduling policy and parameters are preserved across B<execve>(2)."
4460 "子プロセスは B<fork>(2) の際に親プロセスのスケジューリング・ポリシーとパラ"
4461 "メータを継承する。 B<execve>(2) の前後で、スケジューリング・ポリシーとパラ"
4465 #: build/C/man2/sched_setscheduler.2:402
4467 "Memory locking is usually needed for real-time processes to avoid paging "
4468 "delays; this can be done with B<mlock>(2) or B<mlockall>(2)."
4470 "リアルタイム・プロセスは大抵、ページングの待ち時間を避けるために B<mlock>"
4471 "(2) や B<mlockall>(2) を使ってメモリ・ロックをしなければならない。"
4474 #: build/C/man2/sched_setscheduler.2:414
4476 "Since a nonblocking infinite loop in a process scheduled under B<SCHED_FIFO> "
4477 "or B<SCHED_RR> will block all processes with lower priority forever, a "
4478 "software developer should always keep available on the console a shell "
4479 "scheduled under a higher static priority than the tested application. This "
4480 "will allow an emergency kill of tested real-time applications that do not "
4481 "block or terminate as expected. See also the description of the "
4482 "B<RLIMIT_RTTIME> resource limit in B<getrlimit>(2)."
4484 "B<SCHED_FIFO> や B<SCHED_RR> でスケジューリングされる プロセスが停止せずに無"
4485 "限ループに陥ると、 他の全てのより低い優先度のプロセスを永久に停止 (block) さ"
4486 "せてしまうので、 ソフトウェア開発者はコンソールのシェルの静的優先度をテストす"
4487 "る アプリケーションよりも常に高く保つべきである。 これによって期待通りに停止"
4488 "したり終了したりしないリアルタイム・ アプリケーションを緊急終了させることが可"
4489 "能になる。 B<getrlimit>(2) のリソース制限 B<RLIMIT_RTTIME> の説明も参照のこ"
4493 #: build/C/man2/sched_setscheduler.2:422
4495 "POSIX systems on which B<sched_setscheduler>() and B<sched_getscheduler>() "
4496 "are available define B<_POSIX_PRIORITY_SCHEDULING> in I<E<lt>unistd.hE<gt>>."
4498 "POSIX システムでは I<E<lt>unistd.hE<gt>> に B<_POSIX_PRIORITY_SCHEDULING> が"
4499 "定義されている場合にのみ B<sched_setscheduler>() と B<sched_getscheduler>"
4503 #: build/C/man2/sched_setscheduler.2:432
4505 "On success, B<sched_setscheduler>() returns zero. On success, "
4506 "B<sched_getscheduler>() returns the policy for the process (a nonnegative "
4507 "integer). On error, -1 is returned, and I<errno> is set appropriately."
4509 "成功した場合、 B<sched_setscheduler>() は 0 を返す。 成功した場合、 "
4510 "B<sched_getscheduler>() は現在のそのプロセスのポリシー (非負の整数) を返"
4511 "す。 エラーの場合、-1 が返され、 I<errno> が適切に設定される。"
4514 #: build/C/man2/sched_setscheduler.2:438
4516 "The scheduling I<policy> is not one of the recognized policies, I<param> is "
4517 "NULL, or I<param> does not make sense for the I<policy>."
4519 "スケジューリング・ポリシー I<policy> が間違っている。\n"
4520 "または I<param> が NULL である。\n"
4521 "または I<param> がそのポリシーでは意味をなさない。"
4524 #: build/C/man2/sched_setscheduler.2:441
4525 msgid "The calling process does not have appropriate privileges."
4526 msgstr "呼び出したプロセスが適切な特権を持っていない。"
4529 #: build/C/man2/sched_setscheduler.2:447
4531 "POSIX.1-2001 (but see BUGS below). The B<SCHED_BATCH> and B<SCHED_IDLE> "
4532 "policies are Linux-specific."
4534 "POSIX.1-2001 (但し、下記のバグの節も参照)。 B<SCHED_BATCH> と B<SCHED_IDLE> "
4535 "ポリシーは Linux 固有である。"
4538 #: build/C/man2/sched_setscheduler.2:455
4540 "POSIX.1 does not detail the permissions that an unprivileged process "
4541 "requires in order to call B<sched_setscheduler>(), and details vary across "
4542 "systems. For example, the Solaris 7 manual page says that the real or "
4543 "effective user ID of the calling process must match the real user ID or the "
4544 "save set-user-ID of the target process."
4546 "POSIX.1 は、非特権プロセスが B<sched_setscheduler>() を呼び出すために必要な"
4547 "権限の詳細を規定しておらず、 詳細はシステムにより異なる。 例えば、Solaris 7 "
4548 "のマニュアルページでは、 呼び出し元プロセスの実ユーザ ID または実効ユーザ ID "
4549 "が 設定対象のプロセスの実ユーザ ID か保存 (save) set-user-ID と 一致していな"
4553 #: build/C/man2/sched_setscheduler.2:476
4555 "The scheduling policy and parameters are in fact per-thread attributes on "
4556 "Linux. The value returned from a call to B<gettid>(2) can be passed in the "
4557 "argument I<pid>. Specifying I<pid> as 0 will operate on the attribute for "
4558 "the calling thread, and passing the value returned from a call to B<getpid>"
4559 "(2) will operate on the attribute for the main thread of the thread group. "
4560 "(If you are using the POSIX threads API, then use B<pthread_setschedparam>"
4561 "(3), B<pthread_getschedparam>(3), and B<pthread_setschedprio>(3), instead of "
4562 "the B<sched_*>(2) system calls.)"
4564 "Linux では、 スケジューリングポリシーとスケジューリングパラメータは、 実際に"
4565 "はスレッド単位の属性である。 B<gettid>(2) の呼び出しの返り値をこのシステム"
4566 "コールの I<pid> 引き数として渡すことができる。 I<pid> に 0 を指定すると、 呼"
4567 "び出し元のスレッドの属性が設定される。 B<getpid>(2) コールからの返り値を "
4568 "I<pid> に指定すると、 スレッドグループのメインスレッドの属性が設定される "
4569 "(POSIX スレッド API を使用している場合は、 B<sched_*>(2) システムコールの代わ"
4570 "りに B<pthread_setschedparam>(3), B<pthread_getschedparam>(3), and "
4571 "B<pthread_setschedprio>(3) を使用すること)。"
4574 #: build/C/man2/sched_setscheduler.2:486
4576 "Originally, Standard Linux was intended as a general-purpose operating "
4577 "system being able to handle background processes, interactive applications, "
4578 "and less demanding real-time applications (applications that need to usually "
4579 "meet timing deadlines). Although the Linux kernel 2.6 allowed for kernel "
4580 "preemption and the newly introduced O(1) scheduler ensures that the time "
4581 "needed to schedule is fixed and deterministic irrespective of the number of "
4582 "active tasks, true real-time computing was not possible up to kernel version "
4585 "もともとは、標準の Linux は一般目的のオペレーティングシステムとして 設計され"
4586 "ており、バックグラウンド・プロセスや対話的アプリケーション、 リアルタイム性の"
4587 "要求が厳しくないリアルタイム・アプリケーション (普通はタイミングの応答期限 "
4588 "(deadline) を満たす必要があるアプリケーション) を扱うことができた。 Linux "
4589 "カーネル 2.6 では、 カーネルのプリエンプション (タスクの置き換え) が可能であ"
4590 "り、 新たに導入された O(1) スケジューラにより、 アクティブなタスクの数に関わ"
4591 "らずスケジューリングに必要な時間は 固定で確定的 (deterministic) であることが"
4592 "保証されている。 それにも関わらず、カーネル 2.6.17 までは 真のリアルタイム・"
4593 "コンピューティングは実現できなかった。"
4596 #: build/C/man2/sched_setscheduler.2:486
4598 msgid "Real-time features in the mainline Linux kernel"
4599 msgstr "本流の Linux カーネルでのリアルタイム機能"
4601 #. FIXME . Probably this text will need some minor tweaking
4602 #. by about the time of 2.6.30; ask Carsten Emde about this then.
4604 #: build/C/man2/sched_setscheduler.2:500
4606 "From kernel version 2.6.18 onward, however, Linux is gradually becoming "
4607 "equipped with real-time capabilities, most of which are derived from the "
4608 "former I<realtime-preempt> patches developed by Ingo Molnar, Thomas "
4609 "Gleixner, Steven Rostedt, and others. Until the patches have been "
4610 "completely merged into the mainline kernel (this is expected to be around "
4611 "kernel version 2.6.30), they must be installed to achieve the best real-time "
4612 "performance. These patches are named:"
4614 "カーネル 2.6.18 から現在まで、 Linux は徐々にリアルタイム機能を備えつつ\n"
4615 "あるが、 これらの機能のほとんどは、 Ingo Molnar, Thomas Gleixner,\n"
4616 "Steven Rostedt らによって開発された、 以前の I<realtime-preempt> パッチ\n"
4617 "からのものである。 これらのパッチが本流のカーネルに完全にマージされるま\n"
4618 "では (マージの完了はカーネル 2.6.30 あたりの予定)、 最高のリアルタイム\n"
4619 "性能を達成するには realtime-preempt パッチを 組み込まなければならない。\n"
4623 #: build/C/man2/sched_setscheduler.2:504
4625 msgid "patch-I<kernelversion>-rtI<patchversion>\n"
4626 msgstr "patch-I<kernelversion>-rtI<patchversion>\n"
4629 #: build/C/man2/sched_setscheduler.2:510
4631 "and can be downloaded from E<.UR http://www.kernel.org\\:/pub\\:/linux\\:/"
4632 "kernel\\:/projects\\:/rt/> E<.UE .>"
4634 "という名前で、 E<.UR http://www.kernel.org\\:/pub\\:/linux\\:/kernel\\:/"
4635 "projects\\:/rt/> E<.UE> からダウンロードできる。"
4638 #: build/C/man2/sched_setscheduler.2:519
4640 "Without the patches and prior to their full inclusion into the mainline "
4641 "kernel, the kernel configuration offers only the three preemption classes "
4642 "B<CONFIG_PREEMPT_NONE>, B<CONFIG_PREEMPT_VOLUNTARY>, and "
4643 "B<CONFIG_PREEMPT_DESKTOP> which respectively provide no, some, and "
4644 "considerable reduction of the worst-case scheduling latency."
4646 "このパッチが適用されず、かつパッチの内容の本流のカーネルへのマージが 完了する"
4647 "までは、カーネルの設定では B<CONFIG_PREEMPT_NONE>, "
4648 "B<CONFIG_PREEMPT_VOLUNTARY>, B<CONFIG_PREEMPT_DESKTOP> の 3つのプリエンプショ"
4649 "ン・クラス (preemption class) だけが提供される。 これらのクラスでは、最悪の場"
4650 "合のスケジューリング遅延がそれぞれ 全く減らない、いくらか減る、かなり減る。"
4653 #: build/C/man2/sched_setscheduler.2:530
4655 "With the patches applied or after their full inclusion into the mainline "
4656 "kernel, the additional configuration item B<CONFIG_PREEMPT_RT> becomes "
4657 "available. If this is selected, Linux is transformed into a regular real-"
4658 "time operating system. The FIFO and RR scheduling policies that can be "
4659 "selected using B<sched_setscheduler>() are then used to run a process with "
4660 "true real-time priority and a minimum worst-case scheduling latency."
4662 "パッチが適用された場合、またはパッチの内容の本流のカーネルへのマージが 完了し"
4663 "た後では、上記に加えて設定項目として B<CONFIG_PREEMPT_RT> が利用可能になる。"
4664 "この項目を選択すると、 Linux は通常のリアルタイム・オペレーティングシステムに"
4665 "変身する。 この場合には、 B<sched_setscheduler>() で選択できる FIFO と RR の"
4666 "スケジューリング・ポリシーは、 真のリアルタイム優先度を持つプロセスを最悪の場"
4667 "合のスケジューリング遅延が 最小となる環境で動作させるために使われることにな"
4671 #: build/C/man2/sched_setscheduler.2:538
4673 "POSIX says that on success, B<sched_setscheduler>() should return the "
4674 "previous scheduling policy. Linux B<sched_setscheduler>() does not conform "
4675 "to this requirement, since it always returns 0 on success."
4677 "POSIX では、成功時に B<sched_setscheduler>() は直前のスケジューリング・ポリ"
4678 "シーを返すべきとされている。 Linux の B<sched_setscheduler>() はこの要求仕様"
4679 "に準拠しておらず、 成功時には常に 0 を返す。"
4682 #: build/C/man2/sched_setscheduler.2:559
4684 "B<chrt>(1), B<getpriority>(2), B<mlock>(2), B<mlockall>(2), B<munlock>(2), "
4685 "B<munlockall>(2), B<nice>(2), B<sched_get_priority_max>(2), "
4686 "B<sched_get_priority_min>(2), B<sched_getaffinity>(2), B<sched_getparam>(2), "
4687 "B<sched_rr_get_interval>(2), B<sched_setaffinity>(2), B<sched_setparam>(2), "
4688 "B<sched_yield>(2), B<setpriority>(2), B<capabilities>(7), B<cpuset>(7)"
4690 "B<chrt>(1), B<getpriority>(2), B<mlock>(2), B<mlockall>(2), B<munlock>(2), "
4691 "B<munlockall>(2), B<nice>(2), B<sched_get_priority_max>(2), "
4692 "B<sched_get_priority_min>(2), B<sched_getaffinity>(2), B<sched_getparam>(2), "
4693 "B<sched_rr_get_interval>(2), B<sched_setaffinity>(2), B<sched_setparam>(2), "
4694 "B<sched_yield>(2), B<setpriority>(2), B<capabilities>(7), B<cpuset>(7)"
4697 #: build/C/man2/sched_setscheduler.2:566
4699 "The Linux kernel source file I<Documentation/scheduler/sched-rt-group.txt>"
4701 "Linux カーネルソースファイル I<Documentation/scheduler/sched-rt-group.txt>"
4704 #: build/C/man2/sched_yield.2:29
4707 msgstr "SCHED_YIELD"
4710 #: build/C/man2/sched_yield.2:29
4716 #: build/C/man2/sched_yield.2:32
4717 msgid "sched_yield - yield the processor"
4718 msgstr "sched_yield - プロセッサーを空け渡す(yield)"
4721 #: build/C/man2/sched_yield.2:36
4722 msgid "B<int sched_yield(void);>"
4723 msgstr "B<int sched_yield(void);>"
4726 #: build/C/man2/sched_yield.2:41
4728 "B<sched_yield>() causes the calling thread to relinquish the CPU. The "
4729 "thread is moved to the end of the queue for its static priority and a new "
4730 "thread gets to run."
4732 "B<sched_yield>() を呼び出すことで、呼び出したスレッドが CPU の使用権を手放す"
4733 "ことができる。 そのスレッドは、そのスレッドの静的プライオリティのキューの末尾"
4734 "に 移動し、新しいスレッドが走り始める。"
4737 #: build/C/man2/sched_yield.2:48
4739 "On success, B<sched_yield>() returns 0. On error, -1 is returned, and "
4740 "I<errno> is set appropriately."
4742 "成功した場合は B<sched_yield>() は 0 を返す。 エラーの場合は -1 が返され、 "
4743 "I<errno> が適切に設定される。"
4746 #: build/C/man2/sched_yield.2:52
4747 msgid "In the Linux implementation, B<sched_yield>() always succeeds."
4748 msgstr "Linux の実装では、 B<sched_yield>() は常に成功する。"
4751 #: build/C/man2/sched_yield.2:59
4753 "If the calling thread is the only thread in the highest priority list at "
4754 "that time, it will continue to run after a call to B<sched_yield>()."
4756 "B<sched_yield>() を呼び出した時点で最大優先度のリストの中に呼び出し元のス"
4757 "レッドしか 存在しなければ、そのスレッドは呼び出し後も走り続けることになる。"
4760 #: build/C/man2/sched_yield.2:66
4762 "POSIX systems on which B<sched_yield>() is available define "
4763 "B<_POSIX_PRIORITY_SCHEDULING> in I<E<lt>unistd.hE<gt>>."
4765 "POSIX システムで B<sched_yield>() は I<E<lt>unistd.hE<gt>> に "
4766 "B<_POSIX_PRIORITY_SCHEDULING> が定義されている場合にのみ使用可能である。"
4769 #: build/C/man2/sched_yield.2:79
4771 "Strategic calls to B<sched_yield>() can improve performance by giving other "
4772 "threads or processes a chance to run when (heavily) contended resources (e."
4773 "g., mutexes) have been released by the caller. Avoid calling B<sched_yield>"
4774 "() unnecessarily or inappropriately (e.g., when resources needed by other "
4775 "schedulable threads are still held by the caller), since doing so will "
4776 "result in unnecessary context switches, which will degrade system "
4779 "B<sched_yield>() を戦略的に呼び出すことで、(極度に) 競合するリソース (mutex "
4780 "など) を呼び出し元が解放した際に他のスレッドやプロセスに実行機会を与えること"
4781 "で、 性能を上げることができる。 B<sched_yield>() を必要もないのに呼び出した"
4782 "り、不適切な場面 (例えば、他のスケジューリング 対象となるスレッドが必要とする"
4783 "リソースを呼び出し元が保持したままの状態) で呼び出したりするのは避けること。"
4784 "なぜなら、 B<sched_yield>() の呼び出しより不必要なコンテキストスイッチが起こ"
4785 "り、システム性能が 劣化する結果になるからである。"
4788 #: build/C/man2/sched_yield.2:82
4789 msgid "B<sched_setscheduler>(2) for a description of Linux scheduling"
4791 "Linux のスケージュリング (scheduling) については B<sched_setscheduler>(2) を"
4795 #: build/C/man2/setns.2:8
4801 #: build/C/man2/setns.2:8
4807 #: build/C/man2/setns.2:11
4808 msgid "setns - reassociate thread with a namespace"
4809 msgstr "setns - スレッドに名前空間を関連付けしなおす"
4812 #: build/C/man2/setns.2:17
4814 msgid "B<int setns(int >I<fd>B<, int >I<nstype>B<);>\n"
4815 msgstr "B<int setns(int >I<fd>B<, int >I<nstype>B<);>\n"
4818 #: build/C/man2/setns.2:21
4820 "Given a file descriptor referring to a namespace, reassociate the calling "
4821 "thread with that namespace."
4823 "名前空間を参照するファイルディスクリプタを指定すると、\n"
4824 "呼び出したスレッドにその名前空間を関連付けしなおす。"
4827 #: build/C/man2/setns.2:34
4829 "The I<fd> argument is a file descriptor referring to one of the namespace "
4830 "entries in a I</proc/[pid]/ns/> directory; see B<proc>(5) for further "
4831 "information on I</proc/[pid]/ns/>. The calling thread will be reassociated "
4832 "with the corresponding namespace, subject to any constraints imposed by the "
4833 "I<nstype> argument."
4835 "I<fd> 引き数は、 I</proc/[pid]/ns/> ディレクトリ内の名前空間エントリ\n"
4836 "のいずれかを参照するファイルディスクリプタである。\n"
4837 "I</proc/[pid]/ns/> の詳細は B<proc>(5) を参照。\n"
4838 "I<nstype> 引き数で指定された制限の範囲内で、\n"
4839 "呼び出したスレッドに I<fd> に対応する名前空間を関連付けしなおす。"
4842 #: build/C/man2/setns.2:40
4844 "The I<nstype> argument specifies which type of namespace the calling thread "
4845 "may be reassociated with. This argument can have one of the following "
4848 "I<nstype> 引き数は、呼び出したスレッドがどのタイプの名前空間を\n"
4849 "関連付けしなおすことができるかを指定する。\n"
4850 "この引き数には以下のいずれかの値を指定できる。"
4853 #: build/C/man2/setns.2:40
4859 #: build/C/man2/setns.2:43
4860 msgid "Allow any type of namespace to be joined."
4861 msgstr "どのタイプの名前空間も関連付けることができる。"
4864 #: build/C/man2/setns.2:43
4866 msgid "B<CLONE_NEWIPC>"
4867 msgstr "B<CLONE_NEWIPC>"
4870 #: build/C/man2/setns.2:47
4871 msgid "I<fd> must refer to an IPC namespace."
4872 msgstr "I<fd> は IPC 名前空間を参照していなければならない。"
4875 #: build/C/man2/setns.2:47
4877 msgid "B<CLONE_NEWNET>"
4878 msgstr "B<CLONE_NEWNET>"
4881 #: build/C/man2/setns.2:51
4882 msgid "I<fd> must refer to a network namespace."
4883 msgstr "I<fd> はネットワーク名前空間を参照していなければならない。"
4886 #: build/C/man2/setns.2:51
4888 msgid "B<CLONE_NEWUTS>"
4889 msgstr "B<CLONE_NEWUTS>"
4892 #: build/C/man2/setns.2:55
4893 msgid "I<fd> must refer to a UTS namespace."
4894 msgstr "I<fd> は UTS 名前空間を参照していなければならない。"
4897 #: build/C/man2/setns.2:70
4899 "Specifying I<nstype> as 0 suffices if the caller knows (or does not care) "
4900 "what type of namespace is referred to by I<fd>. Specifying a nonzero value "
4901 "for I<nstype> is useful if the caller does not know what type of namespace "
4902 "is referred to by I<fd> and wants to ensure that the namespace is of a "
4903 "particular type. (The caller might not know the type of the namespace "
4904 "referred to by I<fd> if the file descriptor was opened by another process "
4905 "and, for example, passed to the caller via a UNIX domain socket.)"
4907 "呼び出し側が I<fd> がどのタイプの名前空間を参照しているかを知っている\n"
4908 "(もしくは気にする必要がない) 場合には、 I<nstype> に 0 を指定すれば十分\n"
4909 "である。呼び出し側が I<fd> がどのタイプの名前空間を参照しているかを\n"
4910 "知っておらず、かつ、特定のタイプの名前空間であることを保証したい場合、\n"
4911 "I<nstype> に 0 以外の値を指定するとよい。 (ファイルディスクリプタが別の\n"
4912 "プロセスによりオープンされ、例えば、UNIX ドメインソケット経由で呼び出し\n"
4913 "側に渡された場合などでは、呼び出し側が I<fd> がどのタイプの名前空間を\n"
4914 "参照しているかを知らない可能性がある。)"
4917 #: build/C/man2/setns.2:77
4919 "On success, I<setns>() returns 0. On failure, -1 is returned and I<errno> "
4920 "is set to indicate the error."
4922 "成功すると I<setns>() は 0 を返す。\n"
4923 "失敗すると、 -1 が返され、 I<errno> にエラーを示す値が設定される。"
4926 #: build/C/man2/setns.2:82
4927 msgid "I<fd> is not a valid file descriptor."
4928 msgstr "I<fd> が有効なファイルディスクリプタではない。"
4931 #: build/C/man2/setns.2:89
4933 "I<fd> refers to a namespace whose type does not match that specified in "
4934 "I<nstype>, or there is problem with reassociating the the thread with the "
4935 "specified namespace."
4937 "I<fd> が I<nstype> で指定されたタイプと一致しない名前空間を参照している。\n"
4938 "または、指定された名前空間をそのスレッドに関連付けし直す際に問題\n"
4942 #: build/C/man2/setns.2:92
4943 msgid "Cannot allocate sufficient memory to change the specified namespace."
4944 msgstr "指定された名前空間に変更するのに必要なメモリが割り当てられない。"
4947 #: build/C/man2/setns.2:97
4949 "The calling thread did not have the required privilege (B<CAP_SYS_ADMIN>) "
4950 "for this operation."
4952 "呼び出したスレッドがこの操作を行うのに必要な特権 (B<CAP_SYS_ADMIN>) を\n"
4956 #: build/C/man2/setns.2:102
4958 "The B<setns>() system call first appeared in Linux in kernel 3.0; library "
4959 "support was added to glibc in version 2.14."
4961 "B<setns>() システムコールはカーネル 3.0 で Linux に初めて登場した。\n"
4962 "ライブラリによるサポートは glibc バージョン 2.14 を追加された。"
4965 #: build/C/man2/setns.2:106
4966 msgid "The B<setns>() system call is Linux-specific."
4967 msgstr "B<setns>() システムコールは Linux 固有である。"
4970 #: build/C/man2/setns.2:112
4972 "Not all of the attributes that can be shared when a new thread is created "
4973 "using B<clone>(2) can be changed using B<setns>()."
4975 "新しいスレッドが B<clone>(2) を使って作成された際に共有できる全ての属性を、\n"
4976 "B<setns>() を使って変更できるわけではない。"
4979 #: build/C/man2/setns.2:121
4981 "The program below takes two or more arguments. The first argument specifies "
4982 "the pathname of a namespace file in an existing I</proc/[pid]/ns/> "
4983 "directory. The remaining arguments specify a command and its arguments. "
4984 "The program opens the namespace file, joins that namespace using B<setns>(), "
4985 "and executes the specified command inside that namespace."
4987 "以下のプログラムは 2 つ以上の引き数を取る。 最初の引き数には、 既存の I</"
4988 "proc/[pid]/ns/> ディレクトリの名前空間ファイルのパス名を指定する。 残りの引き"
4989 "数は、コマンドとその引き数を指定する。 このプログラムは名前空間ファイルをオー"
4990 "プンし、 B<setns>() を使って名前空間に参加し、 指定されたコマンドをその名前空"
4994 #: build/C/man2/setns.2:131
4996 "The following shell session demonstrates the use of this program (compiled "
4997 "as a binary named I<ns_exec>) in conjunction with the B<CLONE_NEWUTS> "
4998 "example program in the B<clone>(2) man page (complied as a binary named "
5001 "以下のシェルセッションでは、 このプログラム (I<ns_exec> という名前のバイナリ"
5002 "としてコンパイルされている)を、 B<clone>(2) のマニュアルページの "
5003 "B<CLONE_NEWUTS> のサンプルプログラムと組み合わせて使っている。"
5006 #: build/C/man2/setns.2:139
5008 "We begin by executing the example program in B<clone>(2) in the "
5009 "background. That program creates a child in a separate UTS namespace. The "
5010 "child changes the hostname in its namespace, and then both processes display "
5011 "the hostnames in their UTS namespaces, so that we can see that they are "
5014 "まず、 B<clone>(2) のサンプルプログラムをバックグラウンドで実行する。 このプ"
5015 "ログラムは、 別の UTS 名前空間で子プロセスを作成する。 子プロセスは自分の名前"
5016 "空間内でホスト名を変更する。 それから、 親プロセスと子プロセスの両方でそれぞ"
5017 "れの UTS 名前空間のホスト名を表示し、 2 つのホスト名が違うことが確認できる。"
5020 #: build/C/man2/setns.2:151
5023 "$ B<su> # Need privilege for namespace operations\n"
5025 "# B<./newuts bizarro &>\n"
5027 "clone() returned 3550\n"
5028 "uts.nodename in child: bizarro\n"
5029 "uts.nodename in parent: antero\n"
5030 "# B<uname -n> # Verify hostname in the shell\n"
5033 "$ B<su> # 名前空間の操作には特権が必要\n"
5035 "# B<./newuts bizarro &>\n"
5037 "clone() returned 3550\n"
5038 "uts.nodename in child: bizarro\n"
5039 "uts.nodename in parent: antero\n"
5040 "# B<uname -n> # シェルでホスト名を確認\n"
5044 #: build/C/man2/setns.2:158
5046 "We then run the program shown below, using it to execute a shell. Inside "
5047 "that shell, we verify that the hostname is the one set by the child created "
5048 "by the first program:"
5050 "次に、以下のプログラムを使ってシェルを実行する。 このシェルの中では、ホスト名"
5051 "が最初のプログラムで作成された子プロセスが設定したホスト名になっていることを"
5055 #: build/C/man2/setns.2:164
5058 "# B<./ns_exec /proc/3550/ns/uts /bin/bash>\n"
5059 "# B<uname -n> # Executed in shell started by ns_exec\n"
5062 "# B<./ns_exec /proc/3550/ns/uts /bin/bash>\n"
5063 "# B<uname -n> # ns_exec で起動されたシェル内で実行\n"
5067 #: build/C/man2/setns.2:166
5069 msgid "Program source"
5073 #: build/C/man2/setns.2:174
5076 "#define _GNU_SOURCE\n"
5077 "#include E<lt>fcntl.hE<gt>\n"
5078 "#include E<lt>sched.hE<gt>\n"
5079 "#include E<lt>unistd.hE<gt>\n"
5080 "#include E<lt>stdlib.hE<gt>\n"
5081 "#include E<lt>stdio.hE<gt>\n"
5083 "#define _GNU_SOURCE\n"
5084 "#include E<lt>fcntl.hE<gt>\n"
5085 "#include E<lt>sched.hE<gt>\n"
5086 "#include E<lt>unistd.hE<gt>\n"
5087 "#include E<lt>stdlib.hE<gt>\n"
5088 "#include E<lt>stdio.hE<gt>\n"
5091 #: build/C/man2/setns.2:182
5095 "main(int argc, char *argv[])\n"
5100 "main(int argc, char *argv[])\n"
5105 #: build/C/man2/setns.2:187
5108 " if (argc E<lt> 3) {\n"
5109 " fprintf(stderr, \"%s /proc/PID/ns/FILE cmd args...\\en\", argv[0]);\n"
5110 " exit(EXIT_FAILURE);\n"
5113 " if (argc E<lt> 3) {\n"
5114 " fprintf(stderr, \"%s /proc/PID/ns/FILE cmd args...\\en\", argv[0]);\n"
5115 " exit(EXIT_FAILURE);\n"
5119 #: build/C/man2/setns.2:191
5122 " fd = open(argv[1], O_RDONLY); /* Get descriptor for namespace */\n"
5124 " errExit(\"open\");\n"
5126 " fd = open(argv[1], O_RDONLY); /* 名前空間のディスクリプタを取得 */\n"
5128 " errExit(\"open\");\n"
5131 #: build/C/man2/setns.2:194
5134 " if (setns(fd, 0) == -1) /* Join that namespace */\n"
5135 " errExit(\"setns\");\n"
5137 " if (setns(fd, 0) == -1) /* 名前空間に参加 */\n"
5138 " errExit(\"setns\");\n"
5141 #: build/C/man2/setns.2:198
5144 " execvp(argv[2], &argv[2]); /* Execute a command in namespace */\n"
5145 " errExit(\"execvp\");\n"
5148 " execvp(argv[2], &argv[2]); /* 名前空間内でコマンドを実行 */\n"
5149 " errExit(\"execvp\");\n"
5153 #: build/C/man2/setns.2:205
5154 msgid "B<clone>(2), B<fork>(2), B<vfork>(2), B<proc>(5), B<unix>(7)"
5155 msgstr "B<clone>(2), B<fork>(2), B<vfork>(2), B<proc>(5), B<unix>(7)"
5158 #: build/C/man2/unshare.2:20
5164 #: build/C/man2/unshare.2:23
5165 msgid "unshare - disassociate parts of the process execution context"
5166 msgstr "unshare - プロセス実行コンテキストの一部を分離する"
5169 #: build/C/man2/unshare.2:28
5171 msgid "B<int unshare(int >I<flags>B<);>\n"
5172 msgstr "B<int unshare(int >I<flags>B<);>\n"
5175 #: build/C/man2/unshare.2:36
5176 msgid "B<unshare>():"
5177 msgstr "B<unshare>():"
5180 #: build/C/man2/unshare.2:62
5182 "B<unshare>() allows a process to disassociate parts of its execution "
5183 "context that are currently being shared with other processes. Part of the "
5184 "execution context, such as the mount namespace, is shared implicitly when a "
5185 "new process is created using B<fork>(2) or B<vfork>(2), while other parts, "
5186 "such as virtual memory, may be shared by explicit request when creating a "
5187 "process using B<clone>(2)."
5189 "B<unshare>() を使うと、プロセスは他のプロセスと現在共有している 実行コンテキ"
5190 "ストの一部を分離することができる。 実行コンテキストの一部、たとえばマウント名"
5191 "前空間 (mount namespace) などは、新しいプロセスを B<fork>(2) または "
5192 "B<vfork>(2) を使って生成したときに、暗黙のうちに共有される。 一方、仮想メモ"
5193 "リなどは、 B<clone>(2) を使ってプロセスを生成するときに、明示的に共有するこ"
5197 #: build/C/man2/unshare.2:67
5199 "The main use of B<unshare>() is to allow a process to control its shared "
5200 "execution context without creating a new process."
5202 "B<unshare>() の主な利用法は、プロセスが新しいプロセスを生成することなく、 共"
5203 "有実行コンテキストを制御することである。"
5206 #: build/C/man2/unshare.2:74
5208 "The I<flags> argument is a bit mask that specifies which parts of the "
5209 "execution context should be unshared. This argument is specified by ORing "
5210 "together zero or more of the following constants:"
5212 "I<flags> 引き数はビットマスクであり、 実行コンテキストのどの部分の共有を解除"
5213 "するかを表す。 この引き数は、以下の定数の 0 個以上の OR で指定する:"
5216 #: build/C/man2/unshare.2:74
5218 msgid "B<CLONE_FILES>"
5219 msgstr "B<CLONE_FILES>"
5222 #: build/C/man2/unshare.2:82
5224 "Reverse the effect of the B<clone>(2) B<CLONE_FILES> flag. Unshare the "
5225 "file descriptor table, so that the calling process no longer shares its file "
5226 "descriptors with any other process."
5228 "B<clone>(2) B<CLONE_FILES> フラグの効果を取り消す。 ファイルディスクリプタ"
5229 "テーブルを共有させず、 呼び出し元プロセスは他のプロセスとファイルディスクリプ"
5233 #: build/C/man2/unshare.2:82
5236 msgstr "B<CLONE_FS>"
5239 #: build/C/man2/unshare.2:96
5241 "Reverse the effect of the B<clone>(2) B<CLONE_FS> flag. Unshare file "
5242 "system attributes, so that the calling process no longer shares its root "
5243 "directory (B<chroot>(2)), current directory (B<chdir>(2)), or umask (B<umask>"
5244 "(2)) attributes with any other process."
5246 "B<clone>(2) B<CLONE_FS> フラグの効果を取り消す。ファイルシステム属性を共有さ"
5247 "せず、呼び出し元プロセスは、ルートディレクトリ (B<chroot>(2))、カレントディレ"
5248 "クトリ (B<chdir>(2))、 umask (B<umask>(2)) を他のプロセスと共有しなくなる。"
5251 #: build/C/man2/unshare.2:113
5253 "This flag has the same effect as the B<clone>(2) B<CLONE_NEWIPC> flag. "
5254 "Unshare the System V IPC namespace, so that the calling process has a "
5255 "private copy of the System V IPC namespace which is not shared with any "
5256 "other process. Specifying this flag automatically implies B<CLONE_SYSVSEM> "
5257 "as well. Use of B<CLONE_NEWIPC> requires the B<CAP_SYS_ADMIN> capability."
5259 "このフラグは B<clone>(2) B<CLONE_NEWIPC> フラグと同じ効果を持つ。\n"
5260 "System V IPC 名前空間を共有せず、呼び出し元プロセスは 他のプロセスとは\n"
5261 "共有しない固有の System V IPC 名前空間のコピーを持つ。 このフラグを指定\n"
5262 "すると、 B<CLONE_SYSVSEM> も暗黙のうちに指定される。 B<CLONE_NEWIPC> を\n"
5263 "使用するには B<CAP_SYS_ADMIN> ケーパビリティが必要である。"
5266 #: build/C/man2/unshare.2:128
5268 "This flag has the same effect as the B<clone>(2) B<CLONE_NEWNET> flag. "
5269 "Unshare the network namespace, so that the calling process is moved into a "
5270 "new network namespace which is not shared with any previously existing "
5271 "process. Use of B<CLONE_NEWNET> requires the B<CAP_SYS_ADMIN> capability."
5273 "このフラグは B<clone>(2) B<CLONE_NEWNET> フラグと同じ効果を持つ。ネット\n"
5274 "ワーク名前空間を共有せず、呼び出し元プロセスは他のプロセスとは共有しな\n"
5275 "い固有のネットワーク名前空間のコピーを持つ。B<CLONE_NEWNET> を使用する\n"
5276 "には B<CAP_SYS_ADMIN> ケーパビリティが必要である。"
5279 #: build/C/man2/unshare.2:128
5281 msgid "B<CLONE_NEWNS>"
5282 msgstr "B<CLONE_NEWNS>"
5284 #. These flag name are inconsistent:
5285 #. CLONE_NEWNS does the same thing in clone(), but CLONE_VM,
5286 #. CLONE_FS, and CLONE_FILES reverse the action of the clone()
5287 #. flags of the same name.
5289 #: build/C/man2/unshare.2:149
5291 "This flag has the same effect as the B<clone>(2) B<CLONE_NEWNS> flag. "
5292 "Unshare the mount namespace, so that the calling process has a private copy "
5293 "of its namespace which is not shared with any other process. Specifying "
5294 "this flag automatically implies B<CLONE_FS> as well. Use of B<CLONE_NEWNS> "
5295 "requires the B<CAP_SYS_ADMIN> capability."
5297 "このフラグは B<clone>(2) B<CLONE_NEWNS> フラグと同じ効果を持つ。 マウン\n"
5298 "ト名前空間を共有せず、呼び出し元プロセスは 他のプロセスとは共有しない固\n"
5299 "有の名前空間のコピーを持つ。 このフラグを指定すると、 B<CLONE_FS> も暗\n"
5300 "黙のうちに指定される。 B<CLONE_NEWNS> を使用するには B<CAP_SYS_ADMIN>\n"
5304 #: build/C/man2/unshare.2:163
5306 "This flag has the same effect as the B<clone>(2) B<CLONE_NEWUTS> flag. "
5307 "Unshare the UTS IPC namespace, so that the calling process has a private "
5308 "copy of the UTS namespace which is not shared with any other process. Use "
5309 "of B<CLONE_NEWUTS> requires the B<CAP_SYS_ADMIN> capability."
5311 "このフラグは B<clone>(2) B<CLONE_NEWUTS> フラグと同じ効果を持つ。 UTS\n"
5312 "IPC 名前空間を共有せず、呼び出し元プロセスは他のプロセスとは共有しない\n"
5313 "固有の UTS IPC 名前空間のコピーを持つ。 このフラグを指定すると、\n"
5314 "B<CLONE_FS> も暗黙のうちに指定される。B<CLONE_NEWUTS> を使用するには\n"
5315 "B<CAP_SYS_ADMIN> ケーパビリティが必要である。"
5318 #: build/C/man2/unshare.2:163
5320 msgid "B<CLONE_SYSVSEM> (since Linux 2.6.26)"
5321 msgstr "B<CLONE_SYSVSEM> (Linux 2.6.26 以降)"
5323 #. commit 9edff4ab1f8d82675277a04e359d0ed8bf14a7b7
5324 #. As at 2.6.16, the following forced implications also apply,
5325 #. although the relevant flags are not yet implemented.
5326 #. If CLONE_THREAD is set force CLONE_VM.
5327 #. If CLONE_VM is set, force CLONE_SIGHAND.
5328 #. CLONE_NEWNSIf CLONE_SIGHAND is set and signals are also being shared
5329 #. (i.e., current->signal->count > 1), force CLONE_THREAD.
5330 #. FIXME . CLONE_VM is not (yet, as at 2.6.16) implemented.
5333 #. Reverse the effect of the
5338 #. is also implicitly set by
5340 #. and can be reversed using this
5343 #. Unshare virtual memory, so that the calling process no
5344 #. longer shares its virtual address space with any other process.
5346 #: build/C/man2/unshare.2:200
5348 "This flag reverses the effect of the B<clone>(2) B<CLONE_SYSVSEM> flag. "
5349 "Unshare System V semaphore undo values, so that the calling process has a "
5350 "private copy which is not shared with any other process. Use of "
5351 "B<CLONE_SYSVSEM> requires the B<CAP_SYS_ADMIN> capability."
5353 "このフラグは B<clone>(2) B<CLONE_SYSVSEM> フラグの効果を逆転させる。\n"
5354 "System V セマフォのアンドゥ値を共有せず、呼び出し元プロセスは 他のプロ\n"
5355 "セスとは共有しない固有のコピーを持つ。B<CLONE_SYSVSEM> を使用するには\n"
5356 "B<CAP_SYS_ADMIN> ケーパビリティが必要である。"
5359 #: build/C/man2/unshare.2:207
5361 "If I<flags> is specified as zero, then B<unshare>() is a no-op; no changes "
5362 "are made to the calling process's execution context."
5364 "I<flags> に 0 が指定された場合、 B<unshare>() は何も行わないので、 呼び出し"
5365 "元プロセスの実行コンテキストは、何も変更されない。"
5368 #: build/C/man2/unshare.2:212
5370 "On success, zero returned. On failure, -1 is returned and I<errno> is set "
5371 "to indicate the error."
5373 "成功した場合は 0 が返される。 失敗した場合は -1 が返されて、 I<errno> にはエ"
5377 #: build/C/man2/unshare.2:217
5378 msgid "An invalid bit was specified in I<flags>."
5379 msgstr "I<flags> に不正なビットが指定された。"
5382 #: build/C/man2/unshare.2:221
5384 "Cannot allocate sufficient memory to copy parts of caller's context that "
5385 "need to be unshared."
5387 "呼び出し元のコンテキストのうち共有を解除する必要がある部分をコピーするため"
5388 "に、 十分なメモリが確保できなかった。"
5391 #: build/C/man2/unshare.2:224
5393 "The calling process did not have the required privileges for this operation."
5394 msgstr "呼び出し元プロセスはこの操作を行うのに必要な特権を持っていなかった。"
5397 #: build/C/man2/unshare.2:228
5398 msgid "The B<unshare>() system call was added to Linux in kernel 2.6.16."
5399 msgstr "B<unshare>() システムコールは Linux カーネル 2.6.16 で追加された。"
5402 #: build/C/man2/unshare.2:232
5403 msgid "The B<unshare>() system call is Linux-specific."
5404 msgstr "B<unshare>() システムコールは Linux 固有である。"
5406 #. FIXME all of the following needs to be reviewed for the current kernel
5407 #. However, we can do unshare(CLONE_SIGHAND) if CLONE_SIGHAND
5408 #. was not specified when doing clone(); i.e., unsharing
5409 #. signal handlers is permitted if we are not actually
5410 #. sharing signal handlers. mtk
5411 #. However, we can do unshare(CLONE_VM) if CLONE_VM
5412 #. was not specified when doing clone(); i.e., unsharing
5413 #. virtual memory is permitted if we are not actually
5414 #. sharing virtual memory. mtk
5417 #. The current implementation of unshare does not allow unsharing of
5418 #. signals and signal handlers. Signals are complex to begin with and
5419 #. to unshare signals and/or signal handlers of a currently running
5420 #. process is even more complex. If in the future there is a specific
5421 #. need to allow unsharing of signals and/or signal handlers, it can
5422 #. be incrementally added to unshare without affecting legacy
5423 #. applications using unshare.
5425 #: build/C/man2/unshare.2:266
5427 "Not all of the process attributes that can be shared when a new process is "
5428 "created using B<clone>(2) can be unshared using B<unshare>(). In "
5429 "particular, as at kernel 3.8, B<unshare>() does not implement flags that "
5430 "reverse the effects of B<CLONE_SIGHAND>, B<CLONE_THREAD>, or B<CLONE_VM>. "
5431 "Such functionality may be added in the future, if required."
5433 "B<clone>(2) で新しいプロセスを生成したときに共有される全てのプロセス属性"
5434 "を、 B<unshare>() によって共有の解除ができるわけではない。 特に、カーネル "
5435 "3.8 時点では、 B<unshare>() に B<CLONE_SIGHAND>, B<CLONE_THREAD>, "
5436 "B<CLONE_VM> の効果を取り消すためのフラグが実装されていない。 これらの機能は、"
5437 "必要であれば将来追加されるかもしれない。"
5440 #: build/C/man2/unshare.2:272
5441 msgid "B<clone>(2), B<fork>(2), B<kcmp>(2), B<setns>(2), B<vfork>(2)"
5442 msgstr "B<clone>(2), B<fork>(2), B<kcmp>(2), B<setns>(2), B<vfork>(2)"
5445 #: build/C/man2/unshare.2:275
5446 msgid "I<Documentation/unshare.txt> in the Linux kernel source tree"
5447 msgstr "Linux カーネルソース内の I<Documentation/unshare.txt>"
5450 #~ "B<clone>() creates a new process, in a manner similar to B<fork>(2). It "
5451 #~ "is actually a library function layered on top of the underlying B<clone>"
5452 #~ "() system call, hereinafter referred to as B<sys_clone>. A description "
5453 #~ "of B<sys_clone> is given toward the end of this page."
5455 #~ "B<clone>() は B<fork>(2) と同じような方法で新しいプロセスを作成する。 "
5456 #~ "B<clone>() には、ライブラリ関数とその下層にあたる B<clone>() システム"
5457 #~ "コールが存在する。以下の説明では、システムコールの方を B<sys_clone> と表す"
5458 #~ "こととする。 B<sys_clone> に関する説明はこのマニュアルの最後の方にある。"
5461 #~ "The B<clone>() and B<sys_clone> calls are Linux-specific and should not "
5462 #~ "be used in programs intended to be portable."
5464 #~ "B<clone>() と B<sys_clone> コールは Linux 特有であり、移植を考慮したプロ"
5465 #~ "グラムでは使用すべき ではない。"
5468 #~ "I<Documentation/scheduler/sched-rt-group.txt> in the Linux kernel source "
5469 #~ "tree (since kernel 2.6.25)."
5471 #~ "Linux カーネルソース内の I<Documentation/scheduler/sched-rt-group.txt> "
5472 #~ "(カーネル 2.6.25 以降)"
5475 #~ "The PID namespace and the mount namespace are not currently supported. "
5476 #~ "(See the descriptions of B<CLONE_NEWPID> and B<CLONE_NEWNS> in B<clone>"
5479 #~ "現在のところ、 PID 名前空間とマウント名前空間はサポートされていない\n"
5480 #~ "(B<clone>(2) の B<CLONE_NEWPID> と B<CLONE_NEWNS> の説明を参照)。"
5483 #~ "If I<pid> is zero, the time quantum for the calling process is written "
5484 #~ "into I<*tp>. The identified process should be running under the "
5485 #~ "B<SCHED_RR> scheduling policy. POSIX systems on which "
5486 #~ "B<sched_rr_get_interval>() is available define "
5487 #~ "B<_POSIX_PRIORITY_SCHEDULING> in I<E<lt>unistd.hE<gt>>."
5489 #~ "I<pid> がゼロの場合、呼び出したプロセスの時間量が I<*tp> に書き込まれる。"
5490 #~ "指定したプロセスは B<SCHED_RR> スケジューリング方針で稼動している必要があ"
5491 #~ "る。 B<sched_rr_get_interval>() の使用可能な POSIX システムでは "
5492 #~ "I<E<lt>unistd.hE<gt>> で B<_POSIX_PRIORITY_SCHEDULING> が定義されている。"
5495 #~ "I<From Linux 2.6.25 this flag is deprecated.> You probably never wanted "
5496 #~ "to use it, you certainly shouldn't be using it, and soon it will go away."
5498 #~ "I<Linux 2.6.25 以降、このフラグは非推奨である。> このフラグを使いたいと思"
5499 #~ "うことは決してないだろうし、 確実に使わないようにすべきである。 このフラグ"
5500 #~ "は近いうちになくなることだろう。"
5503 #~ "Special rules apply for the B<SCHED_IDLE>: an unprivileged process "
5504 #~ "operating under this policy cannot change its policy, regardless of the "
5505 #~ "value of its B<RLIMIT_RTPRIO> resource limit."
5507 #~ "B<SCHED_IDLE> には特別なルールが適用され、 このポリシーの下で動作する非特"
5508 #~ "権プロセスは、リソース制限 B<RLIMIT_RTPRIO> の値にかかわらず自身のポリシー"
5512 #~ "I<flags> specified B<CLONE_NEWNS> but the calling process was not "
5513 #~ "privileged (did not have the B<CAP_SYS_ADMIN> capability)."
5515 #~ "I<flags> に B<CLONE_NEWNS> が指定されたが、呼び出し元プロセスに特権 "
5516 #~ "(B<CAP_SYS_ADMIN> ケーパビリティ) がなかった。"